Events in jasperReports.

0

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.

henrique.santos1988's picture
Joined: Jan 9 2018 - 8:26am
Last seen: 10 months 1 week ago

3 Answers:

1

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. 

joseng62's picture
620
Joined: Dec 5 2014 - 2:43am
Last seen: 1 month 1 week ago
0

You could tell me materials so I can start, in your third option, I think creating custom java codes is the best way for me; I really need it.

henrique.santos1988's picture
Joined: Jan 9 2018 - 8:26am
Last seen: 10 months 1 week ago
1
hozawa's picture
47047
Joined: Apr 24 2010 - 4:31pm
Last seen: 2 months 2 weeks ago
Feedback
randomness