Options

NAV RDLC Reports: Using Dataset for Totaling Value Fields

SigitaSigita Member Posts: 6
edited 2014-10-06 in NAV Tips & Tricks
I found out that seeing the Dataset of a report can be very helpful, because it shows all values for every Data Item‘s column in one table.
Watch this video (https://www.youtube.com/watch?v=7-IpaGa6aCw) to see how the Dataset can be opened for reports in NAV.
It‘s useful to export this table to Excel and, with the help of filters, see how particular values are calculated. It is less time-consuming than adding test messages to the code or test controls in Layout. Most often, I use the Dataset Table to check total values. If the report was transformed using Partner Zone Report Transformation Service and function CurrReport.CREATETOTALS was used in that report, then you may have to take some actions to re-implement that functionality. The three things I do to re-implement the CurrReport.CREATETOTALS function are:

1.Use the function SUM in Visual Studio Textbox expression (i.e. =SUM(Fields!Sales_Invoice_Line__Amount.Value) )
2.Use the function LAST in Visual Studio Textbox expression (i.e. =LAST(Fields!Sales_Invoice_Line__Amount.Value) )
3.Create new Global Variables in NAV and use them in C/AL code to count the total values. Then add those Global Variables as a Column in adequate data item and use them in Visual Studio as a source expressions.

There is no straightforward rule to identify which of these three options should be selected. If, after transforming your report using Partner Zone Transformation Service, the total fields in your report are not calculated correctly, I would recommend to open the Dataset of your report, check how the total values are calculated, and then decide which of these three options are suitable in your case.

BTW, here you can read more about Partner Zone Transformation Services:
http://1clickfactory.com/partner-zone/1 ... sformation
Developer at 1ClickFactory
Sign In or Register to comment.