Designing reports in Visual Studio
For an introductory example, we will create a simple client-side report presenting data in a NAV Report object. External reporting tools can provide more extensive functionality and flexibility in data manipulation, but client-side reports are a foundation of the NAV reporting toolbox. Its certain advantage is full integration with Role-Tailored Client, including the security system and the ability to execute C/AL code.
The object developed in the recipe is available in the source files (REP50010_ItemSales.txt
).
How to do it...
In the following example, we will design a report to calculate the amount of income, cost, and profit for each sold item.
- Switch to the report designer and press New to create a new
Report
object. - First set up the dataset. Insert one line in the Dataset Designer: Data Type = DataItem, Data Source = Item.
- Under the data item, insert report fields:
Data type
Data source
Name
DataItem
Item
Item
Column
"No."
No
Column...