Take a peek at the class EPSendDocument method makeDocument(). This code actually saves a report to a PDF file without any user interaction, but the general concept should work.
The code creates the ReportRun directly after loading the Report name into the Args() object.
The code that avoids a user dialog is rr.query().interactive(false); and rb.interactive(false);. You'll want to change your PrintJobSettings pjs.setTarget(PrintMedium::Screen);, etc.
The code creates the ReportRun directly after loading the Report name into the Args() object.
The code that avoids a user dialog is rr.query().interactive(false); and rb.interactive(false);. You'll want to change your PrintJobSettings pjs.setTarget(PrintMedium::Screen);, etc.