Posts

Showing posts with the label SSRS as an attachment

AX 2012 - How to send SSRS report in email as an attachment using X++

Hi Technical, Today, in this post we will share, how you can send SSRS report in email as an attachment using X++. Please find the below code... // Created by: Chirag Gupta // Created date: 17-Sep-19 // Summary: Send SSRS Report in excel format as attachment in email. public void EmailSSRSReport(Args _args) {     SrsReportRunController controller = new SrsReportRunController();     SRSPrintDestinationSettings printSettings;     SrsReportEMailDataContract  emailContract;     // set report name     controller.parmReportName(ssrsReportStr(RMPMBPRReport, Report));     // create email contract     emailContract = new SrsReportEMailDataContract();     // fill in the email contract details     emailContract.parmAttachmentFileFormat(SRSReportFileFormat::Excel);     emailContract.parmSubject("RMPM BPR Report " + strUpr(curext()));     emailContract.parmBody(...