In fastReports it is possible to create events that can change the structure of the report before or after generating the report, changing the structure of the information, the reception of parameters and even the structure of the query. How can I perform these actions on Jasper.
1 Answer:
Hi Henrique.
There would be some way to do this, but one would need to decide which option best suits or maybe customise it a bit to suit your needs.
1) you can create a report with mutilple subreports. Then add variable that is a hide value for the subreports . On event the just update the hide value to unhide subrepots. Then reports will be recalled with subreport unhide enabled. Remeber to ensure the subreport size is set to 1 or 2 pixels, because if you hide the reports, it ussually still takes up the space on the report. (White space)
2) If you are integrating reports into your own app, just create seperate reports and when on event is called, just add additional container/placeholder and call the other reports with required parameters to ensure the new reports added to the screen's data is relevant.
3) You could with java api build custom code that compiles reports base on generic components and then generate reports on demand. (Will take longer to generate, but much more flexibility)
I am sure their might be other ways aswell, but these are ways I have come across so far.
Hope it helps to get your mind thinking in the right directions and test this out.
Did you try using Dynamic Reports?
https://community.jaspersoft.com/project/dynamicreports