Report Parameters in Dynamics AX 2012 SSRS Reports

By Becky Newell | May 12, 2015

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

Recommended Reading:

Managing Your Business Through Uncertain Times Using Dynamics 365 Finance and Operations

  Dynamics 365 Finance and Operations (F&O) can help you make informed decisions on how to move your business forward. […]

Read the Article
5.13.22 Power Platform

Using Power BI Object Level Security

  The following article will demonstrate how to use Power BI Object Level Security to disable column data based on […]

Read the Article
5.12.22 Dynamics CRM

How to Use the Stoneridge Support Portal

Stoneridge Software’s support portal is an intuitive and useful function that makes it easy for you to access resources to […]

Read the Article
5.6.22 Dynamics GP

Dynamics GP Transaction Removal: Purchase Orders

  Are you having performance issues with Purchase Orders?  Do you find that there are old Purchase Orders on your […]

Read the Article
5.5.22 Dynamics GP

The Real Story about the Long-Term Future of Dynamics GP Support

I’ve seen a number of people put forward comment that Dynamics GP is going away and you have to get […]

Read the Article

New Features in Dynamics 365 Business Central 2022 Wave 1 Release – Financial Enhancements

The Dynamics 365 Businses Central 2022 Wave 1 Release has a lot of new and exciting features to help your […]

Read the Article
4.29.22 Dynamics GP

Dynamics GP Transaction Removals: Bank Reconciliation

  This is part 2 of a 3 part series on Dynamics GP Transaction Removals. These quick tips will hopefully […]

Read the Article
4.28.22 Dynamics GP

Uncommonly Used Features – Integrate Purchasing and Payables to Fixed Assets in Dynamics GP

Being able to integrate Purchasing and Payables to Fixed Assets in Dynamics GP will help you create visibility for your […]

Read the Article

New Features in the Dynamics 365 Business Central 2022 Wave 1 Release – Ease-of-Use Features

  There are many new features in the Dynamics 365 Business Central 2022 Wave 1 Release to get excited about! […]

Read the Article

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X