14 March 2014

Set query Range for Existing report in while running in class PrintMedium settings for Report in class

Method()
{
Args args;
ReportRun reportRun;
str reportName = "ReportNameTest";
str myPath;
int i;
TransDate td;
TransDate vd;
str rangeDate;
;
i = 1;
td = systemDateget();
args = new Args(reportName);
args.caller(reportRun);

reportRun = new reportRun(args);
reportRun.query().interactive(false);
reportRun.query().dataSourceTable(tablenum(TableNmae)).addRange(fieldNum(TableNmae,FeildNmae)).value(SysQuery::value(td));
reportRun.report().interactive(false);

reportRun.setTarget(printMedium::File);
reportRun.printJobSettings().setTarget(PrintMedium::File);
reportRun.printJobSettings().preferredTarget(PrintMedium::File);
reportRun.printJobSettings().format(PrintFormat::PDF);
reportRun.printJobSettings().warnIfFileExists(false);
reportRun.printJobSettings().suppressScalingMessage(true);
pdfFileName = @"\\AXTESTDEV1\D$\Demo\Test.pdf";
reportRun.printJobSettings().fileName(pdfFileName);

reportRun.init();
reportRun.run();
}

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...