In this post we will walk through some basic concepts/terms for Dynamics AX SSRS reporting.
Report types definition
Broadly speaking reporting in AX 2012 can be classified into two types of reporting:
- AX SSRS: Typically reports that are transactional in nature and consume data from Dynamics AX (through AX Query, RDP etc.) for data are referred to as AX SSRS reports.
- AX OLAP: Typically reports that are analytical in nature and consume data from AX cubes (by MDX queries) are referred to as AX OLAP
Let’s go through them in detail:
In AX 2012 SSRS reporting there is a new framework available that developers have to use to create and run reports. Let’s go through some of the terms that we will be frequently using:
- Query: Typically refers to AX query in case of AX transitional reports.
- Report Data Provider (RDP): X++ data class used in AX SSRS reporting which can be used to retrieve data, process business logic.
Base class is “SrsReportDataProviderBase”. Any class that is defined as a Data Provider class for a report should inherit from this base class.
- Query Contract: This is the query lookup in report dialog that shows the query ranges. This is handled internally by framework.
- Report Data Contract (RDP contract): X++ class containing parameters definitions to be used by RDP for parameter value processing to be used in RDP business logic.
Any class defined as a contract should have the “[DataContractAttribute]” on top of class definition and “[DataMemberAttribute (<ParameterName>)]” on top of parameter properties.
- RDL Data Contract: X++ class that can be used to access and modify design level parameters used in the report that are not part of RDP contract.
Base class is “SrsReportRdlDataContract”. Any class defined as controller class should inherit from the base class.
- Report Controller: A class that can be used to control the report execution and validation. These classes can also be used to control the dialog and validations before & after the dialog is shown.
Base class is “SrsReportRunController”. Any class defined as controller class should inherit from the base class.
- UI Builder: X++ class that can be used to design a report parameter dialog for custom look and feel. The same can be sued for any event handling that is required on the report dialog. Also can be used for adding custom lookups to the parameters too.
Base class is “SrsReportDataContractUIBuilder”. Any class defined as controller class should inherit from the base class.
- Data Methods: A C# method that can be used in report data sets. This can contain retrieval mechanism logic as well as processing of business logic.
- Enum Provider: An extension provided by framework which can retrieve the name/label data for an AX Enum.
In AX OLAP reports the only way of retrieving data is using MDX query. The MDX query is the same as used in SQL Server Analysis Services cubes. Detailed language reference for MDX can be found in MSDN.