First, you need to create a query.
- Open Visual Studio as administrator.
- From the File menu, select New > Project. Select Dynamics 365 on the left pane. select Finance Operations in the middle pane. Enter ReportingProject in the Name field. Select OK.
- In the Solution Explorer, right-click your project node, and then select Add > New Item.
- Select Data Model and then select Query.
- For the Name field, enter FMVehicleModelQuery and then select Add.
- Open the Application Explorer view, if it is not already open.
- In the AOT, open Data Model > Tables, and then select and drag FMVehicleModel table to the data source of your query.
- In the properties of the QueryRootDataSource FMVehicleModel, set the Dynamic Fields property to Yes.
- Select Save all.
- Right-click the Project and build (Ctrl+Shift+B).
Now, you will create the report.
- In the Solution Explorer, right-click your project node and then select Add > New Item.
- Select the Reports node on the left pane and then select Report on the middle pane.
- In the Name field, type FMVehicleModelReport and then select Add.
- Right-click the Datasets node and then select New Data Set.
- In Properties, set the Dynamic Filters property to True.
- Enter FMVehicleModelDS in the Name property.
- Select the Query property and then select the ellipsis (…) to view a list of Queries.
- On the Select a Query page, select FMVehicleModelQuery and then select Next.
- Select the All Fields check box and then select OK.
- Drag and drop FMVehicleModelDS from the Datasets node to the Designs node.
- On the Designs node, expand the newly created AutoDesign1.
- Expand the FMVehicleModelDSTable1.
- On the Datasets node, expand the FMVehicleModelDS.
- Expand the Fields node if it is not already expanded.
- Drag and drop Make_Make from the Fields node to Designs > AutoDesign1 > FMVehicleModelDSTable1 > Groupings.
- Save all.
- Right-click Solution and build (Ctrl+Shift+B).
- In the Solution Explorer, right-click FMVehicleModelReport and then select Deploy Reports.
Next, you will create a menu item to run the report.
- In the Solution Explorer, right-click your project node and then select Add > New Item.
- Select User Interface and then select Output Menu Item.
- Name the Output menu item FMVehicleModelReport and then select Add.
- Drag the FMVehicleModelReport report from the Solution explorer onto the Menu Item that you just created.
- Save all.
- Right-click Solution and build (Ctrl+Shift+B).
Finally, you will run the report.
- In the Solution explorer, select the FMVehicleModelReport Output menu item, and then right-click and select Set as Startup object.
- Select Start on the Standard Toolbar in Visual Studio.
- Select Ctrl+F5 to run the menu item.
Resource:
https://docs.microsoft.com/en-us/learn/modules/build-reports-finance-operations/04-exercise