Search code examples
javaprintingjasper-reportsdynamic-reports

How to print a report automatically as soon as it loads with DynamicReports?


I wrote this app that manages clients, I am generating reports with DynamicReports.

I have created an option in my app that generates a report for each client in a press of a button.

For Example: if I have 5 clients, I press "generate reports" and 5 reports are opened, 1 for each client.

Is there a way to automatically send the report to a printer once it's loaded?

Now, I have to press print manually 5 times, once for each report.


Solution

  • Add

    report.print();
    

    to every report which is being created.