Hi
I have the following code (excerpt only, not full method) to both email a SSRS report and save it as a file:
// create email contract emailContract = new SrsReportEMailDataContract(); // fill in the email contract details emailContract.parmAttachmentFileFormat(SRSReportFileFormat::PDF); emailContract.parmSubject("My Report"); emailContract.parmTo("someone@someone.com"); // email report certificateController.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::Email); certificateController.parmReportContract().parmPrintSettings().parmEmailContract(emailContract); certificateController.parmReportContract().parmPrintSettings().fileFormat(SRSReportFileFormat::PDF); certificateController.parmReportContract().parmPrintSettings().fileName(tSaveParameters.CertificateUNCPath + '\\' + fileNamePDF); certificateController.runReport(); // generate file for archiving certificateController.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::File); certificateController.parmReportContract().parmPrintSettings().overwriteFile(true); certificateController.parmReportContract().parmPrintSettings().fileFormat(SRSReportFileFormat::PDF); certificateController.parmReportContract().parmPrintSettings().fileName(tMFilesParameters.FLW_MFilesCertificateUNCPath + '\\' + fileNamePDF); certificateController.runReport();
When the email is received, the report as an email attachment is the AOT name of the report eg. Reportname.PrecisionDesign1.pdf
When the report is saved to a file share, it is the name I gave it.
Can I change the name of the attachment on the email, in the same way I change the name of the saved file?
Many thanks in advance!
*This post is locked for comments