How to: Add Totals in Visual Studio

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 2013 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 2013. 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

Show: