I've written a new Report that's is generated in tandem with the Sales Confirmation Report.
When I run the Sales Confirmation report and the new report as Proforma then I can set whether I want them to be displayed onscreen or sent to a printer. Both options work.
When I run the reports normally (with posting to the journal) then my report can only be sucessfully sent to a printer. When I select on screen I get the following exception:
Cannot render the report to the screen when running in non-client mode (for example, in batch or in IL). Change the print destination to a location other than the screen. For example, a printer, file, or email.
The way my report is integrated is as follows:
- In SalesConfirmController.outputReport() I check if the report needs to be printed
- If so a method printMyReport in SalesConfirmJournalPrint is called
- This method creates a MyReportController and passes the necessary root record and print settings to it