i have taken item ledger entry table as record variable in report.
RecILE.RESET;
RecILE.SETRANGE("Document No.","Purch. Rcpt. Line"."No.");
IF RecILE.FINDFIRST THEN
LotNo:=RecILE."Lot No.";
Hi midego, i have added get in code it still not giving output
RecILE.RESET;
RecILE.GET();
RecILE.SETRANGE("Document No.",RecILE."Document No.");
RecILE.SETRANGE("Item No.","Purch. Rcpt. Line"."No.");
IF RecILE.FINDFIRST THEN
LotNo:=RecILE."Lot No.";
now it giving error while running report:
error:the item Ledger Entry does not exist.identification and values Entry No.='0'
I used following code and it works it prints Lot No.
RecILE.RESET;
RecILE.SETRANGE("Document No.","Purch. Rcpt. Line"."Document No.");
RecILE.SETRANGE("Item No.","Purch. Rcpt. Line"."No.");
IF RecILE.FINDFIRST THEN
LotNo:=RecILE."Lot No.";
Exactly sir, Now I am facing problem It prints only one lot No. But I want to print multiple lot No. Suppose item consuming 50kg out of 100 kg from lot no 1 and 50 kg from lot No.2 Now questions is that how to print both lot No. in report what C/AL code for that please help Thanks in advance
I believe you can do it by adding another element on your report dataset. Datasource RecILE, and FILTER as you have previously.
Then you can add another repeater element on your report with the RecILE and lotnumbers.
Hi sir, added dataitem ILE and column Lot No. How adding dataitem ILE and column Lot No. gives multiple lot No.in report. RecILE.RESET; RecILE.SETRANGE("Document No.","Purch. Rcpt. Line"."Document No."); RecILE.SETRANGE("Item No.","Purch. Rcpt. Line"."No."); //IF RecILE.FINDFIRST THEN //LotNo:=RecILE."Lot No."; IF RecILE.FINDSET THEN REPEAT LotNo:=RecILE."Lot No."; UNTIL RecILE.NEXT=0;
Answers
RecILE.RESET;
RecILE.GET();
RecILE.SETRANGE("Document No.",RecILE."Document No.");
RecILE.SETRANGE("Item No.","Purch. Rcpt. Line"."No.");
IF RecILE.FINDFIRST THEN
LotNo:=RecILE."Lot No.";
now it giving error while running report:
error:the item Ledger Entry does not exist.identification and values Entry No.='0'
RecILE.RESET;
RecILE.SETRANGE("Document No.","Purch. Rcpt. Line"."Document No.");
RecILE.SETRANGE("Item No.","Purch. Rcpt. Line"."No.");
IF RecILE.FINDFIRST THEN
LotNo:=RecILE."Lot No.";
Suppose item consuming 50kg out of 100 kg from lot no 1 and 50 kg from lot No.2
Now questions is that how to print both lot No. in report what C/AL code for that please help
Thanks in advance
Then you can add another repeater element on your report with the RecILE and lotnumbers.
Adding recILE in data source give me following error:
'Record' is not valid column type
How adding dataitem ILE and column Lot No. gives multiple lot No.in report.
RecILE.RESET;
RecILE.SETRANGE("Document No.","Purch. Rcpt. Line"."Document No.");
RecILE.SETRANGE("Item No.","Purch. Rcpt. Line"."No.");
//IF RecILE.FINDFIRST THEN
//LotNo:=RecILE."Lot No.";
IF RecILE.FINDSET THEN
REPEAT
LotNo:=RecILE."Lot No.";
UNTIL RecILE.NEXT=0;
Is it right for multiple lot no.