Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

SrsReportRunController Run With Parameters

$
0
0

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");
}


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>