Report Parameters in Dynamics AX 2012 SSRS Reports

by | Updated August 15, 2016 | Development, Dynamics AX, Reporting, SQL

SSRS in the Parameters Node

If you regularly develop Dynamics AX 2012 reports you have likely seen the report parameters displayed in SSRS under the Parameters node.  It is the very last node displayed in the report. In the Parameters list are parameters coming from the datasets and global parameters that come with every AX SSRS report like AX_CompanyName and AX_UserContext. 

For the parameters originating from datasets:

                1.  If your datasets use queries the parameters represent the ranges on your query.

                2.  If your datasets uses a data provider class, the parameters are the data member methods on your data contract class.

These parameters are not difficult to understand or change.  The other set of parameters, the global ones, are more difficult to understand.  The global parameters are added directly into to the report by right-clicking on the Parameters node and choosing Add.  Microsoft adds several parameters into each report in order to pass data required every report to execute.  For that reason every report will contain parameters like AX_PartitionKey, AX_UserContext and AX_CompanyName.  The difficult part to understand about report parameters is, how might you take advantage of a parameter that does not come from a range or a data contract class?  When would you add a parameter directly to the report?

I ran into a scenario recently where a report parameter worked flawlessly.  I was modifying an existing AX report, VendPurchOpenLines_NA.  The vanilla AX report uses a query, VendPurchOpenLines, to pull data rather than a data contract.  On the query there are 5 different fields added as ranges.  All of those fields have parameters generated for them on the SSRS report.  Those parameters are in turn displayed in a prompt when the AX user executes this report.  My customer wanted to also add a checkbox parameter to the prompt to include financial information.  If the user unchecks the checkbox, a few fields should be hidden on the report.  A checkbox does not sound difficult to add, but in this scenario that checkbox is not based on a field in the query used by the report.  In other words, there was not an additional range I could add to the query without changing the data returned by the query.  I was not interested in creating a data provider and data contract class for this report because it was a lot of overhead and customization for the purposes of adding one checkbox to the prompt presented to the user.  The perfect solution in this scenario is a parameter added directly to the report.

In SSRS under the Parameters node, I right-clicked and chose Add.  I gave my parameter a name of InclCostInfo, set the data type property to boolean, and finally set the default value property to true.  That is really all there is to it.  In AX when the user runs the report my newly added parameter is picked up and displayed in the prompt.  If the user unchecks the checkbox in the prompt, I can respond to their request by inspecting the report parameter with this expression =Parameters!InclCostInfo.Value = “False” in my SSRS report design.

 

Related Posts

  • Your Microsoft Dynamics AX system is a critical component of successfully managing your business. A Dynamics Health Check will proactively identify potential configuration and performance issues to maximize uptime and…

  • I have been doing a lot of report development Dynamics AX 2012 lately, and one of the ‘stranger’ issues I have run into is data not displaying correctly in the reports. …

  • Over on the AX Support site on MSDN, Daniel Durrer has taken the time to keep tabs on the latest builds for Microsoft Dynamics AX 4.0, 2009 and 2012.  I…

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

august

05aug10:00 am10:30 amOn the Job with Dynamics 365 - Manufacturing Shipping / Receiving Department

05aug12:00 pm1:00 pmHow Ag Coops Can Simplify Processing Equity Payments using Levridge

12aug10:00 am10:30 amWhy Levridge Grain? How to Achieve Efficient and Accurate Scale Tickets

12aug12:00 pm1:00 pmThe Three Paths to Dynamics 365 Finance and Supply Chain from Dynamics AX

13aug11:00 am12:00 pmConfab with Stoneridge - Livestream - Inspire Keynote Breakdown

19aug10:00 am11:00 amWhat is Levridge? An Overview of the Ultimate Ag Solution

19aug12:00 pm12:30 pmThe Modern Manufacturer - Death by Safety Stock

27aug11:00 am12:00 pmConfab with Stoneridge - Livestream - Dynamics 365 2020 Wave 2 Preview

september

02sep10:00 am10:30 amThe Modern Manufacturer - Cycle Count Management

09sep11:00 am12:00 pmModernizing Batch Manufacturing - Ensuring Compliance and Quality Control

16sep10:00 am10:30 amThe Modern Manufacturer - Product Lifecycle Management

30sep10:00 am10:30 amThe Modern Manufacturer - Return Management

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X