AX2012/D365FnO – HOW TO DEVELOP NEW SSRS REPORT USING RDP IN D365FnO : PART-2

D365fno-PostImage

In this blog post, I will explain how to develop a new custom SSRS report from scratch using DataContract, Controller, UIBuilder and Report Data Provider (RDP) classes in D365FnO.

Create Report design:
A report is a document that displays data from one or more sources in a structured and readable format. Reports can help you analyze, summarize, and communicate information to your stakeholders. In Dynamics 365 Finance and Operations (D365FnO), you can create and customize reports using various tools and methods. One way to add a report in your project is Right-click on the project > Add > New Item > Dynamics 365 Items > Reports > Report > Enter the name of report > Click Add.  

1. Once you create the report set the Title from the properties windows.

2. In the Report Designer, you can add Datasets right-click on Datasets > New Data Set of the report.
3. Set the name of the Datasets as CarInvoiceDS from the properties and set the other properties according to the screenshot.

4. Click Next select the TmpCarInvoice table fields that you are required on the design and click Ok.

5. Add Report Design:
On report designer right-click on the Designs > New > Precision Design.

6. Set the design layout and display the data according to requirements. In the design table set the DataSetName as CarInvoiceDS from the properties.

7. Save and Deploy the report from the project.

Create Controller class:
The Controller class is a powerful tool that can be used to control the execution of an RDP report in D365FnO. By using the Controller class, you can ensure that your reports are executed correctly and that the results are displayed in the desired format. You can create class: Right-click on the project  > Add > New Item > Dynamics 365 Items > Code > Class > Enter the name of class > Click Add.
class DSRReportController extends SrsReportRunController
{
    public static void main(Args args)
    {
        DSRReportController   controller  = new DSRReportController();
        controller.parmReportName(ssrsreportstr(DSRReport, Report));
        controller.parmDialogCaption("DSR Report");
        controller.startOperation();

    }
}
Add Action Menu Item:
To create a Action Menu Item in D365FnO, you need to follow these steps:
1. In the Solution Explorer, right-click the report project and select Add > New Item.
2. In the Add New Item dialog box, select Dynamics 365 Items > User Interface > Action Menu Item and enter a name for the Action Menu Item.
3. Click Add to create the Action Menu Item.
4. Open the action menu item and set the the Label of the action menu item. 
5. Set the Object Type as a class from the drop-down.
6. Select Object as controller class (DSRReportController)
7. Save and Build the complete project.

I hope this blog post was helpful for you to learn how to create a SSRS report from scratch using classes in D365FnO. Thank you for reading!

PART-1:           How to develop a SSRS report using classes report code

This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.