Jump to content
We've recently updated our Privacy Statement, available here ×

Report with a dinamic columns number


ahmetunal

Recommended Posts

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...