Pages

Tuesday, 4 June 2013

MS Dynamics AX 2012 introduction of RDP

BUSINESS LOGIC IN REPORTS
  When I discuss "business logic" in this post, I am referring to code that is used to generate data for use in reports. In Dynamic AX 2009 there really is no great way to reuse your X++ code in an SSRS report. This is one reason I recommend that everyone stick with simple query-based reports in Dynamics AX 2009. Of course, we wanted to make this much easier in Dynamics AX 2012 and that is why we created a concept called the Report Data Provider.


WHAT IS A REPORT DATA PROVIDER?
It is a X++ code-based way of generating data for reports. This code can use any technique to generate data for Dynamics AX 2012 Reports. It is the correct and supported way to reuse your existing X++ code in Dynamics AX 2012 reports.

HOW IT WORKS
The simplest summary is that you create a table – usually a temp table. And then a class – this is known as the Report Data Provider class. When the report is run, the class populated the temp table with data. One the data completely populated it is transferred to the SSRS server.

CONSTRUCTING THE TEMP TABLE
First, decide what fields you need in your report. Then create a table with those fields. You MUST assign Extended Data Types to those fields. Then set the TableType property to "TempDB"
Here's a simple table with just two fields


No comments:

Post a Comment