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 R2 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
In Visual Studio, select the total field on the report and on the shortcut menu, select Expression.
In the Expression window, enter the following expression:
=SUM(Fields!<tablefield>.Value)
For example:=SUM(Fields!Sales_Line_Amount.Value)
Save the report in Visual Studio.
Compile and save the report in Microsoft Dynamics NAV 2013 R2. 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.