ahmetunal Posted December 25, 2007 Share Posted December 25, 2007 Hi, my question is if jasperrerport is able to allow me create a report with dinamic columns based on my sql select. I need that the report's columns changes according to the sql instruction. is possible ? some idea ?? thanks in advance Link to comment Share on other sites More sharing options...
teodord Posted December 27, 2007 Share Posted December 27, 2007 Hi, When you talk about a report that has different columns every time it is run, you mean you are not actually running the same report.You are running a different report every time your columns or your report template structure change. In the eyes of your users, it might look like it is the same report, with different columns, but from the report engine perspective it is not the same report.It is a report template that is build/changed dinamically by the parent application, before it is run. You need to use the JR API to create your report template either from scratch or starting from an existing JRXML that you modify according to what you need to display at runtime. This new report template that you obtain by using the JR API (a JasperDesign object) needs to be compiled at runtime in order to obtain the JasperReport object that will be filled with data. Check the JR tutorial and also the /demo/samples/noxmldesign sample provided with the project to see how the JR API can be used to create report template at runtime. I hope this helps.Teodor 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