AgNi00
2009-12-03 09:46:01 UTC
I want my invoice created to file an not printed to screen.
Is there anything else that I have to do with the printjobsettings to get it
to work? Tried this job where I set the filename, format and printmedium but
it still just prints to screen.
static void job(Args _args)
{
CustInvoiceJour InvJTbl;
SalesId Id;
ReportRun report;
RecordSortedList List = new RecordSortedList(62);
SalesFormLetter_Invoice SalesFormLetter;
;
salesformletter = new SalesFormLetter_Invoice(false);
Id = "100000002";
Select InvJTbl Where InvJTbl.SalesId == Id;
List.ins(InvJTbl);
report = new ReportRun(new Args(ReportStr(SalesInvoice)));
report.args().caller(null);
report.args().object(List);
report.printJobSettings().setTarget(PrintMedium::File);
report.printJobSettings().format(PrintFormat::PDF);
report.printJobSettings().fileName("C:\\Temp\\Test.pdf");
report.run();
}
Is there anything else that I have to do with the printjobsettings to get it
to work? Tried this job where I set the filename, format and printmedium but
it still just prints to screen.
static void job(Args _args)
{
CustInvoiceJour InvJTbl;
SalesId Id;
ReportRun report;
RecordSortedList List = new RecordSortedList(62);
SalesFormLetter_Invoice SalesFormLetter;
;
salesformletter = new SalesFormLetter_Invoice(false);
Id = "100000002";
Select InvJTbl Where InvJTbl.SalesId == Id;
List.ins(InvJTbl);
report = new ReportRun(new Args(ReportStr(SalesInvoice)));
report.args().caller(null);
report.args().object(List);
report.printJobSettings().setTarget(PrintMedium::File);
report.printJobSettings().format(PrintFormat::PDF);
report.printJobSettings().fileName("C:\\Temp\\Test.pdf");
report.run();
}