Creating a menu item for the report
The final part of developing a report is to make it available inside AX for the users. Post deployment, the report can be linked to an Output menu item. This recipe will expose the report inside the rich client through a menu item.
How to do it...
A menu item for the report can be created as follows:
- Navigate to AOT | Menu Items | Output, right-click and select New Menu Item. Set the following properties including the LinkedPermissionType setup shown in the screenshot:
- Open the menu item to run the report. A dialog is shown, the range Search Name added in the query appears followed by a Select button. The Select button is similar to the MorphX reports option where the user can specify additional conditions. To disable the select option go to the
Dynamic Filter
property in the dataset and set it tofalse
. - The report output should appear as follows:
How it works...
The report viewer in Dynamics AX is actually a form with an embedded browser control. The browser constructs the report URL at runtime and navigates to the report's URL. Unlike in AX 2009, when the report is rendering the data, it doesn't hold up using AX. Instead, the user can use the other parts of the application while the report is rendered in parallel. This is particularly beneficial for the end user as they can continue to proceed with other tasks as the report executes.
The permission setup is important as it helps in controlling the access permissions of a report.
See also
- Adding reports to the role center in Chapter 6, Beyond Tabular Reports.
- Handling events post report completion in Chapter 8, Troubleshooting and Other Advanced Recipes.
Tip
To make changes faster and to view the changes on the reporting screen, use the vertical group option in Visual Studio. This puts the report model and the preview side-by-side, making it easier to review the changes as seen in the following screenshot:
Tip
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.