Dear All,
I am creating a report in which i want to show value through variable names “AssVal” so i have set following filter on predataitem Trigger in report. But it is showing zero value in report.
PurchInvLine.RESET;
PurchInvLine.SETFILTER(“Document No.”,“Excise Entry”.“Document No.”);
PurchInvLine.SETFILTER(“No.”,“Excise Entry”.“Item No.”);
AssVal:=PurchInvLine.“Assessable Value”;
Please tell me where i am doing wrong.
Thanx in advance.
Rgds
Neel
Write a code on onAftergetrecord on Excise Entry Data Item.
Write below code in OnAfterGetRecord trigger of dataitem
PurchInvLine.RESET;
PurchInvLine.SETFILTER(“Document No.”,“Excise Entry”.“Document No.”);
PurchInvLine.SETFILTER(“No.”,“Excise Entry”.“Item No.”);
IF PurchInvLine.FINDFIRST THEN //New Line
AssVal:=PurchInvLine.“Assessable Value”;
Make usre the filters on PurchInvLine are correct…
Sir,
I write same code on OnAftergetrecord of Excise Entry Date Item but result is zero.
use PurchInvLine.findfirst or PurchInvLine.calcsums (if you want sums)
Did you set proper filters?
Set above filters manually and see how many records you get and does the record has Assessable value or not…
DONT USE
PurchInvLine.SETFILTER(“Document No.”,“Excise Entry”.“Document No.”);
PurchInvLine.SETFILTER(“No.”,“Excise Entry”.“Item No.”);
USE
SETRANGE(“Document No.”,“Excise Entry”.“Document No.”);
May I know the dataitems of report? and in which dataitem Onaftergetrecord did you write the code?