Parameterize the Order By Clause? [message #1403441] |
Wed, 23 July 2014 16:31 |
andy rush Messages: 15 Registered: July 2014 |
Junior Member |
|
|
So, i'm creating a reporting application using the BIRT API to report against our Postgres database. One goal is to give users the ability to sort the records by any column in the result set. In the BIRT FAQ (http://wiki.eclipse.org/BIRT/FAQ/Data_Access) I find the following:
"Q: When do I use BIRT vs. SQL sorting?
For performance, use SQL sorting whenever possible, especially if your database has indexes that will speed up the sort. If your report has no groups, and your SELECT statement has the correct ORDER BY clause, then simply do not specify a sort order within BIRT."
Based on the above information i create a query in PGAdmin that sorts on a column in the resultset, but when i parameterize the query to sort on a different column, the row order remains the same - the parameter is (apparently) passed into the ReportViewer but has no effect. I don't have a lot of experience with BIRT so, to make sure my procedures were correct, i added a parameter to the WHERE clause which executes perfectly.
So, i'm thinking it is not possible to add a parameter to the ORDER BY clause of an SQL statement in BIRT? Is this correct?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03049 seconds