Hi All,
I am sending the srss report in pdf format by the following method. How can i run with parameters?
For example My parameters _BuzWarrantyDirectionType.
Thank you.
public void run()
{
SrsReportRunController ssrsController = new SrsReportRunController();
SRSPrintDestinationSettings printerSettings;
str ReportPath,PdfFile;
SysMailer mail = new SysMailer();
SysemailParameters param=SysemailParameters::find();
BuzWarrantyTable _BuzWarrantyTable;//table
BuzWarrantyDirectionType _BuzWarrantyDirectionType = 0;//field
;
PdfFile = "Guarantee Letter List" +"_"+int2str(dayOfMth(today())) +"_"+ int2str(mthOfYr(today()));
ReportPath = "\\\\Server\\Test\\"+PdfFile+".pdf";
ssrsController.parmReportName(ssrsReportStr(LmkKuveytWarrantyTableNotification, LmkKuveytWarrantyTableNotification));
ssrsController.parmExecutionMode(SysOperationExecutionMode::Synchronous);
ssrsController.parmShowDialog(false);
printerSettings = ssrsController.parmReportContract().parmPrintSettings();
printerSettings.landscape(true);
printerSettings.printMediumType(SRSPrintMediumType::File);
printerSettings.fileFormat(SRSReportFileFormat::PDF);
printerSettings.overwriteFile(true);
printerSettings.fileName(@ReportPath);
ssrsController.runReport();
mail.attachments().add(@ReportPath);
mail.quickSend(param.SMTPUserName,"***@***.***","Subject","Description");
}