How to migrate RDP Base Class to Pre-process RDP Microsoft Dynamics AX 2012

Report Data Provider.

An RDP class is an X++ class that is used to access and process data for a Reporting Services report. The options for a data source type for a Microsoft Dynamics AX report are query, business logic, and RDP. An RDP class is an appropriate data source type when the following conditions are met.

  1. You cannot query directly for the data you want to render on a report.
  2. The data to be processed and displayed is from Microsoft Dynamics AX.

Preprocessing reports

SSRS uses the WCF (Windows Communication Foundation) to connect to the AOS for data access. This connection has a threshold limit and it might fail if a report takes a long time to execute. The report server execution waits for the RDP to process the data and return it. In the event where the RDP takes too long a time to execute the reporting, the service might fail. Preprocessing is a strategy to beat this issue. This recipe will help you understand how to enable preprocessing for any RDP report

How to do it

When a report processes a huge amount of data or is found to take considerable time during the execution, then you can decide to incorporate preprocessing. Follow these steps to enable preprocessing.

  1. Modify RDP base class:  SRSReportDataProviderBase -> SRSReportDataProviderPreProcessTempDB
  2. Update table type:  InMemory -> TempDB
  3. Perform a full compile of IL
  4. Restart the AOS
  5. Introduce Controller class to run the report
  6. Update Output Menu Item:  Report -> Controller class
Advertisements

Code debugging and Breakpoints in dynamics AX 2012 X++

In Microsoft Dynamics AX 2012, development can be done in both X++ and .NET managed code, X++ is an object-oriented language with similarities to C#. X++ is part of the MorphX development platform that is used to construct accounting and business management systems.

The process for debugging X++ code varies depending on whether you are debugging standard X++ code or X++ code that is executed in Common Intermediate Language (CIL).

in this article we are going to cover standard X++ code debugging

Standard X++ Code debugging

To debug X++ code, you use the Microsoft Dynamics AX debugger. This is the full-featured debugger that is part of the MorphX suite of tools. You can use this debugger to debug X++ code that:

  • Runs on the client Side
  • Runs on the server side and is not executed in CIL

To debug X++ code, you set a breakpoint in the MorphX code editor.

  1. In the AOT, create a new Job.
  1. CreateJob
  2. Place a breakpoint on line from you need to start debugging

Breakpoint

3. Press F5 to compile and run the code. The debugger will starts.

Debug

4. Press F10 to step over each line of code or F11 to Step Into the Code

In above picture we can see there are two types of breakpoints

  1. We can type the Breakpoint above the line from where we need to start debugging (It will work on application level)
  2. Secondly we can place breakpoint by pressing F9 or simply click on left side bar of the line of code where we need to place break point (It will work on session level)

In next article we will cover debugging of the X++ code that is executed in Common Intermediate Language (CIL)