Jaa


How to Add Totals in Visual Studio in Dynamics NAV

Totals are an important element of creating useful reports. By totaling data, your report can help the user analyze data that is not otherwise readily available. For example, totals provide a useful overview of the total sales for a given month. Reports can be created with Microsoft Dynamics NAV 2018 and later designed using Visual Studio. This topic describes how to add totals to a report in Visual Studio.

To add totals in Visual Studio

  1. In Visual Studio, select the total field on the report and on the shortcut menu, select Expression.

  2. In the Expression window, enter the following expression: =SUM(Fields!<tablefield>.Value)
    For example: =SUM(Fields!Sales_Line_Amount.Value)

  3. Save the report in Visual Studio.

  4. Compile and save the report in Microsoft Dynamics NAV 2018. A message informs you that the .rdlc file for this report has changed and asks if you want to load the changes. Choose Yes to save the changes in the database.

See Also

Walkthrough: Designing a Report with Images, Interactive Sorting, and Visibility Toggle
Walkthrough: Creating a Link from a Report to a Page
How to: Make a Report Available from a Page