How to add or change a parameter in Dynamics AX SSRS report

To add an additional parameter in SSRS report or to change the name or type of an existing one, the following steps should be taken:

1. Add parameter in the report data contract.
2. Change and compile contract and data provider.
3. Perform incremental CIL.
4. Restart AOS.
5. In Visual Studio attach the data provider class again to the SSRS report.
6. Refresh data set of the SSRS report.
This way also parameters will be refreshed. Rename the parameter if needed.
7. Add report to AOT.
8. Compile report in AOT.
9. Export the report to XPO to check if the new parameter is there.

2 thoughts on “How to add or change a parameter in Dynamics AX SSRS report

  1. Hi,

    I have a report in the Tax Module -> Inquiries and Reports -> Sales Tax Reports -> Sales Tax Deviations in Dynamics 365. It has only 2 parameters. For instance, i want to add a parameter in it, say a dialog field of TaxCode which would only show the records in the report where the taxCode is that specified in the paramter, so I will have duplicate the contract class “TaxDeviationContract” in my project and make the changes and because I will have to change the name of this contract class, i will have to duplicate the UIBuilder Class and the DP Class of this report so that the new Contract Class works because of which I will have to customize the report as well and the add an extension of the MenuItem as well in the project.
    I have done all of this and got the required result as well but what I wanted to ask was that can all of this work be done without having to duplicate the report and the DP class? or the UIBuilder class.
    Can all of this be done by just Duplicating the Contract Class and then creating another class where the DP business logic could be updated?
    Is there any solution to this?

    Thanks.

  2. Hi,

    Unfortunately, so far extending data contracts in order to add new report parameters is not supported (D365FOE version July 2017 Platform 10).
    You have to create a new contract (to derive from the existing one) with a new parameter, and consequently to create a new data provider (to derive from the existing one) that is related to the new contract through the SRSReportParameterAttribute attribute, and then to override the processReport() method in order to consider the new parameter. Consequently, you need to duplicate the existing SSRS report and select the new DP class as its data source, and also, to extend the existing report menu item to point to the duplicated report.

    Anyway, I noticed that there is a dynamic parameter (‘Records to include’) presented for the Sales Tax Deviations report, where you can select Tax Code as a parameter. Would this work for your scenario?

    On the other hand, if you need to add additional data to your report you can do it without extensions and yet without overlayering by using Docentric artifacts, in much easier way. You can even suppress the existing RDP logic and inject your own, without need to touch existing RDP tables.
    With the help of Docentric, you can also create custom reports significantly faster, without creating RDP classes or tables. You can add data from arbitrary AX tables and views, or any other internal or external data source, using plain X++. Report data sources can be shaped into meaningful groups and hierarchies, unlike SSRS’s “rectangular” data.

    Regards,
    Ana

Leave a Reply

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

*

Docentric respects your privacy. Learn how your comment data is processed >>