Tuesday, March 19, 2013

Get the element name of an AX2012 Report from the preview

This is going to be a short post, but hopefully it will help someone still.

One of the essential tasks when delivering an Dynamics AX solution to a customer will always be report customization. There are more than one thousand SSRS reports deliveres with Dynamics AX out of the box. I would say it is closed to guaranteed the customer wants some of them adjusted.

With the release of AX 2012 R2, more of the central reports are now split up into new reports dependent on various configurations being active or not. So what report is run can be a result of license, configuration or simply the state of the entity you are trying to report. This often results in frustration for the developer or consultant who is trying to figure out what exact SSRS Report element is actually being used. You don't want to spend time changing the wrong layouts.

The solution is actually very simple. You could even share this with the super user when asked what exact report is bugging them.

While in the preview of a SSRS Report, click the Save-button and choose PDF (other formats works as well):



Have the consultant or super user note down the suggested file name. This will be the name of the element within the AOT. After the dot, you will have the name of the design.


In order to figure out why one layout is chosen over another, you will still have to step through the code, but you know an easy way to find the correct Report element name.

UPDATE:
I realize this does not always work as intended. Some reports in some languages will rather suggest the title of the report as filename.

In those cases, you want to do what Lurker so kindly suggests in the comment below.

"\Forms\SrsReportViewer\Methods\init add a breakpoint
In the call stack open Classes\SrsReportRunController
this.reportname will have the report name and design."