Thursday 21 February 2019

Get global parameter value in Query Based SSRS report in D365FO & AX2012

Recently I have got a requirement in which I have to add a new parameter in query based report, since I cannot change the query ranges so there is no option left except to use Global Parameter. I have simply add the parameter but unable to get the value of it. I have also search over the internet but couldn't find the solution, so after a little struggle with D365 I have able to solve this problem by writing only one line source code that returns my global parameter value and meet my requirement.

Note: In SSRS report global parameters are added directly into to the report by right-clicking on the Parameters node and choosing Add. Microsoft dynamics adds several parameters into each report in order to pass data required every report to execute. Parameters created with query range or from contract classes are pretty straight forward but the other set of parameters, the global ones, are more difficult to understand. You can learn more about parameters from this link.

Source Code:






//Get the parameter value
boolean parameterValue = this.parmReportContract().parmRdlContract().getParameter("Parameter Name in SSRS Report").getValueTyped();

That is all you need to write to get global parameter value.

No comments:

Post a Comment

Key Updates in Dynamics 365 F&O for Version 10.0.39

Here’s a concise summary of the  platform updates  in  Microsoft Dynamics 365 Finance & Operations version 10.0.39 (March 2024) : 1- Add...