i want to take sales price and line discount field from the sales line discount table for the calculation purpose on customer item sales report.i used navision NAV 2009 R2.i take sales line discount table as Record in C/AL Global and then used in report but its changes is not reflect in report after saving the report.
How did you use it in report?
Is it classic report/rtc report?
classic report and also open classic report in visual studio for edit and reflect in RTC
Is it working in classic report?
You didnt answer how did you use the global variable in report?
i used global variable as Record datatype and used that table in report by using tablename.fieldname.
i written this code C/AL Code but it display the SplPrc value zero when i run the report in classic client and RTC.
IF SalesLineDiscount.“Sales Price” <> 0 THEN
SplPrc := ROUND(SalesLineDiscount.“Sales Price”-(SalesLineDiscount.“Sales Price” * SalesLineDiscount.“Line Discount %” /100),0.1)
SplPrc := 0;
Where did you write code to get the SalesLineDiscount Record?
Which record it should check?
I hope you are looking at correct report and correct database [;)]
As well as you didn’t answered Mohana Questions?
i write this code in C/AL code in classic client with sql server .Then open the report in visual studio and write this code in expresion field.
You should write above code once you got the record from Sales Line Discount table.
You should get the record by using GET/SETRANGE functions etc
should it need to declare sales line discount as a Temp table in C/AL Global variable and also i write the code in OnAfterGetRecord of integer table.i used report customer item sales-Report no.113.