Wednesday, February 11, 2015

Run SSRS report from code in AX2012 R3


public static void runSSRSReport()
{
   

SrsReportRunController controller;


controller = new SrsReportRunController();

controller.parmLoadFromSysLastValue(false);

controller.parmReportName("SR_MainAccount.AutoDesign1"); //name of report to print

controller.parmReportContract().parmPrintSettings().landscape(true);
 
controller.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::File);
controller.parmReportContract().parmPrintSettings().fileFormat(SRSReportFileFormat::PDF);
controller.parmReportContract().parmPrintSettings().overwriteFile(true);
controller.parmReportContract().parmPrintSettings().fileName(strFmt("\\\\shop3\\AxaptaPDF\\P%1.pdf",ID)); //filename to print pdf to
controller.parmReportContract().parmPrintSettings().fromPage(1);
controller.parmReportContract().parmPrintSettings().toPage(1);
controller.parmReportContract().parmRdlContract().setValue("mi_prisskilt_ItemId",ID); //parameters to send to report

controller.runReport();

}

quote from https://www.linkedin.com/groups/How-can-I-run-SSRS-3793661.S.210858144





No comments:

Post a Comment

Applying SMA10/20, SMA20/50 as trading signals

This is the comparison for results before and after applying SMA10/20 and SMA20/50 in the stock trader. Background Trading 3 stock ma...