Hi All,
i made a Report in NAV 2013 but am not able to get Percentage
Percentage:=value/Total
please help me
COMPETITOR TYPES
|
VALUE
|
PERCENTAGE
|
BOILER
|
0
|
|
CAPSULE MACHINE
|
0
|
|
FRESH MILK
|
2
|
|
LCM CONVERTED
|
0
|
|
MANUAL
|
2
|
|
REPEATED ORDER
|
0
|
|
TOTAL
|
4
|
|
In my opinion you should calculate total in report dataset designer (increasing a decimal variable in OnAfterGetRecord trigger) and use it as Value in Visual Studio, like = Fields!Value.Value / Total * 100.
I think the challenge here is that NAV calculates the total as it runs the report so you do not know the final total until the end of the report. What I would suggest is to pre-determine the total either in a new DataItem that is the same as the one you are trying to run or to calculate by creating a record variable with all of the same filters as the existing DataItem. Once you have this total you can simply create a new column in the report designer, calculate the percentage and then expose this to the RTC report for display.