elimesika Posted January 15, 2009 Share Posted January 15, 2009 HI I am new to Jaspersoft products and I wonder Is it possible to have column header sorting in a Jasper Report Thanks Link to comment Share on other sites More sharing options...
chris_andre Posted January 22, 2009 Share Posted January 22, 2009 It is possible but it depends of your implementation of JasperReports. Most of the time, we pass a parameter that indicates the sorting order of your column at the generation of your report. The problem is that, every time you want to reorder a column, you have to re-generate the report. Link to comment Share on other sites More sharing options...
rmartony Posted January 22, 2009 Share Posted January 22, 2009 Hi Chris, the parameter should appear in the *SQL Query* as an "order by $P{parameter}"?Or there is an other way to do this?Thanks, Rafael.Post Edited by xxxx xxx at 01/23/09 12:49 Link to comment Share on other sites More sharing options...
rmartony Posted January 27, 2009 Share Posted January 27, 2009 Any Ideas how to do sorting by clicking on the column header?I tried to pass the column number as a parameter and then do an 'order by' in the SQL Query but it didn't work.The order by does nothing. I'm using Jasperserver 3 and Oracle 10g.Thanks,Rafael. Link to comment Share on other sites More sharing options...
mdahlman Posted January 27, 2009 Share Posted January 27, 2009 Rafael, You should be able to do the sorting like you're describing. You'll have a parameter that gets set to "ORDER BY MyColumn". And the SQL query will look like this:SELECT...WHERE ...$P!{MyOrderByParam} Another option that people may want to consider is the "HTML Template Exporter". It supports column sorting, hide/showing sections (folding), and pop-up windows. It is a utility available in the JasperShop. Regards,Matt Link to comment Share on other sites More sharing options...
rmartony Posted January 28, 2009 Share Posted January 28, 2009 Thank you very much Matt. I was missing the ! after $P. Regards, Rafael. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now