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

optimize multiple generation


Grolapin

Recommended Posts

Hello,

 

I used JasperReports (and iReport) for some months, but I'm actually facing with a little problem :

 

I wish to generate a pdf more than once time, without re-execute data request which is very heavy and needs amount of time.

The only one difference between copies is a number in each page footer, for example "specimen 1/3", "specimen 2/3"...

 

Obviously I could create a report with as much identical subreports as copies needed, and a field in the page footer for display the index of each copy. However I don't enjoy this solution because the request will be executed for each subreport.

 

Another idea ?

 

For example I'm able to concatenate as many times as I need a pdf, but I don't see how to "modify" each one to put his index in the footer.

After filling the report and before exporting it, is it possible to access fields in the JasperPrint object ? It could be a solution...

 

Thanks a lot,

Grolapin.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Modifying the text in the JasperPrint object seems indeed to be the best way to do it.

 

You should put some text in the element at fill time which you would use then to identify the text element in the print page. Currently, there is no simpler way to identify the text element (report elements have a key property but this is not currenlty propagated to the print elements).

 

Regards,

Lucian

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...