| Dynamic Column Sorting [message #197923] | 
Thu, 26 October 2006 19:27   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: ndesai.applocation.net 
 
Hi, 
 
I was wondering if anyone knows if it is possible to create a BIRT report,  
such that the user can click on the column headings and have the report  
sort itself by that column.  
 
I know one way to fake this would be to create multiple version of the  
report, where each version is sorted by a different column, and thus when  
clicking the column name are brought to a different report that is sorted  
by the correct column. However, is there a way to do this without having  
to fake it?  
 
Thanks, 
 
Neesha
 |  
 |  
  | 
| Re: Dynamic Column Sorting [message #197986 is a reply to message #197923] | 
Fri, 27 October 2006 06:32   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: jhurley12.gmail.com 
 
it's possible to 'fake it' with just one rptdesign file.  It still requires  
a new query (assuming your using a sql data source) each time you want to  
sort.  add a parameter to the report, call it sort or something.  if you  
script your query, you can change the 'order by' clause based on the  
parameter.  you could format this parameter to handle sort direction (or add  
a direction parameter) I  think this is easier than building 20 different  
reports.  Alternatively you could use the sorting feature found in the table  
property editor.  you can add multiple sort keys and directions, just base  
them on the sort/direction parameters (if (params["sort"].equals("name")  
row["name"];) and it is possible to link to the same report from the column  
headers, changing these params accordingly. 
 
hope this helps 
Joe 
 
"Neesha" <ndesai@applocation.net> wrote in message  
news:713212648bf08d0006e3de67943bb434$1@www.eclipse.org... 
> Hi, 
> 
> I was wondering if anyone knows if it is possible to create a BIRT report,  
> such that the user can click on the column headings and have the report  
> sort itself by that column. 
> I know one way to fake this would be to create multiple version of the  
> report, where each version is sorted by a different column, and thus when  
> clicking the column name are brought to a different report that is sorted  
> by the correct column. However, is there a way to do this without having  
> to fake it? 
> Thanks, 
> 
> Neesha 
>
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.03325 seconds