Custom SSRS Report in Dynamics 365 Finance and Operation (Part II)

Custom SSRS Report in Dynamics 365 Finance and Operation (Part II)

Hello! I welcome you to learn SSRS reports part 2; If you missed part 1, do not worry and just click the link here Custom SSRS Report Part 1.

Today, we try to develop a custom SSRS report with multi-select lookup and UI Buildeclass. But before proceeding, let understand some basic element used in SSRS report development and in upcoming part III, we do programming for it.

What is RDP Reports

RDP is the data source type which is available when we add a new dataset to the report in Visual Studio. RDP is a class which resides inside AX and executes the business logic, processes the data, and returns a dataset which is rendered in the report.

Element used in Reports Development

  1. Contract Class
  2. UI Builder Class
  3. RDP Class (Report Data Provider)
  4. Table
  5. Output Menu Item
  6. Report
  7. Menu Extension

Data Contract Class

A data contract class is an X++ class which contains parm methods with the DataMemberAttribute defined at the beginning of the method. This class is used to define one or more parameters that will be used in a SSRS report.

UI Builder Class

User Interface (UI) Builder Class is used to define the layout of the parameter dialog box that opens before a report is run in Microsoft Dynamics AX. It is used to add the customizations as well as additional fields in the dialog.

RDP Class

Report Data Provider Class is X++ class that is used to access and process data for a SSRS report. The RDP class processes the business logic based on a specified parameter and/or query and returns a dataset to the reporting services.

In order to create a RDP class in AX, you have to extend that class with SRSReportDataProviderBase/ SRSReportDataProviderTempBase. This tells AX that this class will be used by reporting services to process the data.

Two important attributes are used in RDP classes:

  1. SRSReportQueryAttribute: specifies which AOT query will be used in this report. If the RDP class uses an AOT query to process data, define this attribute at the beginning of the class.
  2. SRSReportParameterAttribute: defines the data contract class that will be used by this report to prompt for parameter values. If the RDP class contains any parameters this define this attribute at the beginning of the class.

No alt text provided for this image

Table

An AX table is used as the dataset to store data for the report. The RDP class processes the data and stores it in the table which is then used by a SSRS report to render data.A table can be a temporary table (InMemory or TempDB) or a regular table, but it is Microsoft best practice to use a temporary table.

  1. InMemory temporary table is used when the data set is small.
  2. TempDB is normally used for larger datasets to improve performance.

Report

Steps:

  1. Right click on project
  2. Add new item
  3. Select report and rename the report
  4. Click in add button.

  • When report is created open report and right click on data set and add data set
  • After creating new dataset set properties.

No alt text provided for this image


Set dataset properties.

  1. Set data source type to Report Data Provider.
  2. Select on query.
  3. List of DP classes will be open select your dp class.  

No alt text provided for this image


After selecting DP class temp table fields will be shown and right click on design and add Precision Design.

No alt text provided for this image

Output Menu Item

Output menu item is used to print report.

Menu Extension

Drag and drop menu item in menu extension.

Happy Learning

Syed Amir Ali


To view or add a comment, sign in

More articles by Syed Amir Ali

Insights from the community

Others also viewed

Explore topics