18.03.2008, 03:14 | #1 |
Участник
|
C# and AX Development: Printing directly to PDF in AX
Источник: http://olondono.blogspot.com/2008/03...ly-to-pdf.html
============== References: AxaptaPedia To achieve this task, we need to set some values to the printing settings before running the report like this: X++: // Variables PrintJobSettings printJobSettings; ReportRun myReportRun; ... // Getting the report settings printJobSettings = myReportRun.printJobSettings(); // Setting our parameters printJobSettings.setTarget(PrintMedium::File); printJobSettings.preferredTarget(PrintMedium::File); printJobSettings.format(PrintFormat::PDF); printJobSettings.preferredFileFormat(PrintFormat::PDF); printJobSettings.fileName("c:\\attachment.pdf"); // Saving values myReportRun.unpackPrintJobSettings(printJobSettings.packPrintJobSettings()); // Running the report myReportRun.run(); X++: query = myReportRun.query();
qbds = query.dataSourceNo(1);
qbds.range(1).value(_custTable.CustAccount);
qbds.range(2).value("");
qbds.range(3).value(queryvalue(NoYes::Yes));
myReportRun.run(); X++: myReportRun.deviceName("PDFCreator");
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|