PrintJobSettings.allPages Method [AX 2012]
Controls whether the All or Pages option button should be selected when you run the sysPrintForm.
public boolean allPages([boolean all])
Run On
CalledParameters
- all
- Type: boolean
A boolean value that, if true, the All option button is selected; otherwise, the Pages option button is selected.
Return Value
Type: booleantrue if the All radio button should be selected; otherwise, false, and the Pages option button is selected.
The following example prints pages 2 to 4 and selects the Pages option button instead of the All option button.
static void PrintingToPDF(Args _args)
{
Args args;
ReportRun rr;
str reportName = 'Cust';
int i;
int numReports = 10;
args = new Args(reportName);
rr = new ReportRun(args,'');
rr.setTarget(Printmedium::File);
rr.printJobSettings().format(PrintFormat::RTF);
rr.printJobSettings().fileName("C:\\tmp\\Cust_ReportRange2.rtf");
// Select the Pages option button rather than the All option button.
rr.printJobSettings().allPages(false);
rr.printJobSettings().from(2);
rr.printJobSettings().to(4);
rr.query().interactive(false);
rr.report().interactive(false);
rr.run();
}
Community Additions
ADD
Show: