danda Posted March 10, 2010 Share Posted March 10, 2010 Hi, I am evaluating jasper reports, together wth jasperserver for a customer. We are really happy with the solution except that the customer has a non-negotiable requirement that the user must be able to choose which columns are in the report at runtime.All the forum and blog posts I've seen indicate that jasper cannot do this. There is DynamicJasper, but its not at all clear how that would integrate with JasperServer... I think the answer is - it doesn't.I have also seen a promising "Column Manager" upcoming feature listed in the tracker. But I retrieved the latest code from SVN and I don't see any related commits yet.http://jasperforge.org/projects/jasperreports/tracker/view.php?id=4177 So, I resolved to see about hacking the jasperreports engine with some very simplistic and custom support to do what I need. I found that "printWhenExpression" is already close. I can get it to visually hide the columns I don't want, including the col header and footer. However, there are two problems with that:1) It is ugly. It leaves a big gaping hole where the column was, when the space should be used by the next column to the right.2) CSV and other spreadsheet type reports still print the column as existing. The requirement is that they NOT appear. So I am looking for advice from a jasper developer. My questions:1) Can you recommend place(s) in the code to hook in where I can check printWhenExpression() and resolve the above issues? ( Of the two, the second is most important. )2) Will the ColumnManager feature referenced above solve these issues? If so, is there an ETA for this feature. I'd be quite happy with SVN code if it solves #2 above. Thanks Link to comment Share on other sites More sharing options...
nestoru Posted June 9, 2011 Share Posted June 9, 2011 Hi Danda,I am wondering how did you solve the issue. I see you were on the right track as I believe the table component is the way to go however it is not working for me. Thanks in advance,-Nestor Link to comment Share on other sites More sharing options...
nestoru Posted June 10, 2011 Share Posted June 10, 2011 Here is what I did to solve this issue. Hopefully will help others.Thanks,-Nestor 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