static void krishh_ReportPDF(Args _args)
{
args args;
ReportRun rr;
Report rb;
PrintJobSettings pjs;
CustInvoiceJour record;
;
select record;
if (record.TableId != tableNum(docuRef))
{
args = new Args('salesinvoice');
args.record(record);
args.parmEnum(PrintCopyOriginal::Copy);
rr = new ReportRun(Args,'');
rb = rr.report();
rr.suppressReportIsEmptyMessage(true); // no more "Report is empty..." stuff
rb.interactive(false);
rr.query().interactive(false);
rr.init();
pjs = rr.printJobSettings();
pjs.virtualPageHeight(0);
pjs.fitToPage(true);
pjs.setTarget(PrintMedium::File);
pjs.viewerType(ReportOutputUserType::PDF);
pjs.format(printFormat::PDF);
pjs.fileName('d:\\ole2.pdf');
rr.run();
}
}
{
args args;
ReportRun rr;
Report rb;
PrintJobSettings pjs;
CustInvoiceJour record;
;
select record;
if (record.TableId != tableNum(docuRef))
{
args = new Args('salesinvoice');
args.record(record);
args.parmEnum(PrintCopyOriginal::Copy);
rr = new ReportRun(Args,'');
rb = rr.report();
rr.suppressReportIsEmptyMessage(true); // no more "Report is empty..." stuff
rb.interactive(false);
rr.query().interactive(false);
rr.init();
pjs = rr.printJobSettings();
pjs.virtualPageHeight(0);
pjs.fitToPage(true);
pjs.setTarget(PrintMedium::File);
pjs.viewerType(ReportOutputUserType::PDF);
pjs.format(printFormat::PDF);
pjs.fileName('d:\\ole2.pdf');
rr.run();
}
}
hello Krishh
ReplyDeleteI have a question and would like to know if you know how.
I'm developing a wcf service in ax2012 that returns a pdf with the invoice, and I could not make me streaming returns a pdf
I would appreciate if you have any idea how to do