24.11.2013, 21:11 | #1 |
Участник
|
goshoom: Printing reports from code in AX2012
Источник: http://dev.goshoom.net/en/2013/11/pr...ode-in-ax2012/
============== How to print a report from X++ and change print settings in AX2012? I have a concrete example for you – it should give a good idea how to do that even if your situation is a little bit different. SrsReportRunController controller = new SrsReportRunController();SysUserLicenseCountRDPContract rdpContract = new SysUserLicenseCountRDPContract();SRSPrintDestinationSettings settings; // Define report and report design to usecontroller.parmReportName(ssrsReportStr(SysUserLicenseCountReport, Report));// Use execution mode appropriate to your situationcontroller.parmExecutionMode(SysOperationExecutionMode::ScheduledBatch);// Suppress report dialogcontroller.parmShowDialog(false); // Explicitly provide all required parametersrdpContract.parmReportStateDate(systemDateGet());controller.parmReportContract().parmRdpContract(rdpContract); // Change print settings as neededsettings = controller.parmReportContract().parmPrintSettings();settings.printMediumType(SRSPrintMediumType::File);settings.fileFormat(SRSReportFileFormat::Excel);settings.fileName(@'\\share\UserLicenseCount.xlsx'); // Execute the reportcontroller.startOperation(); Источник: http://dev.goshoom.net/en/2013/11/pr...ode-in-ax2012/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|