Bridging the gap. Making the leap. Taking the plunge. All business catchphrases or Foster the People cover bands? Your call. But they all describe the goal of today’s blog post. We’ve talked in the past about how to create SSRS reports for AX 2012 and we’ve discussed Role Centers (albeit for AX 2009, but *spoilers* the editing of Role Centers hasn’t changed much from 2009 to 2012). Now it would be nice to connect those two concepts, so we’ll focus on adding an SSRS report to a Role Center page. Also, I’ve already trademarked those bands names, so I better not see you playing under one of those noms de plume anytime soon.
This example is going to add the summary pie chart from the last blog to a generic Role Center page. The basic process is to save the report to the AOT, deploy the report, create a menu item for the report, and then add the report to the Role Center page. As a side note, the shared library from AX supplies layout temples not only for reports, but also for role center reports. It would be a best practice to use these templates for report designs you intend to display on role center pages.
To save the report to the AOT, right-click the solution name in the Solution Explorer in Visual Studio.
Once the report saves, open the AOT and locate the new report under the SSRS Reports node. Right-click the new report and select Deploy Element. An infolog message will let you know when the deployment is complete.
Now expand the Menu Items node and the Output node. Right-click the Output node and select New Menu Item.
Rename the menu item as desired. Change the Object Type to SSRS Report and then select the Object for your new report. You’ll also need to specify which design to use if your report has several designs and you’ll want to add a label for the menu item to be displayed.
The new report is now available to added to a Role Center page. Open up your Role Center, select to personalize the page (upper right corner), and add a new web part to a desired area of the page. Choose to add a Report Web Part from the Microsoft Dynamics AX category and click Add.
A new report web part will be added to your role center page. To specify which report to display, click the down arrow for the new web part and select Edit Web Part. From the list of available reports in the web part’s properties, select the menu item label for the new report.
You may need to edit some of the other properties for the web part for the report to display as you want, but that concludes the process for adding a report developed in Visual Studio 2010 to a role center page in Microsoft Dynamics AX 2012.