RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog
Hi venkatesh
Here's example:
I create a custom query-based SSRS report to display the vendor info.
I add it as a menu item button on the Vendor form.
Obviously, when the button in clicked I want to pass the Vendor's Account Num as a range on my report as it should display the info for the specific vendor I have selected.
I do that as shown below:
void clicked()
{
SRSReportRun srsReportRun = new SRSReportRun(ssrsReportStr(myVendorInfo_SRS, PrecisionDesign1));
;
//init report run
if(srsReportRun.init())
{
//reset the query so that any previously set ranges are gone
srsReportRun.resetQueries();
//set value for parameter "Printing Date" to today
srsReportRun.reportParameter(identifierStr(PrintingDate)).value(systemDateGet());
//set range on vendor Account num
SysQuery::findOrCreateRange(srsReportRun.reportQuery("").datasourceTable(tableNum(VendTable)), fieldNum(VendTable, AccountNum)).value(VendTable.AccountNum);
//run report
srsReportRun.run();
}
else
warning("Report could not be executed. Please contact your system administrator");
}