Hi,
I changed this report a bit inorder to get proper values by replacing “Purchase Line” table with “Prod. Order Line” table. Now its not repeating the items, but its showing only the first line i.e only the first item [:(] Can anyone help me out with this pls…
Hav written this code in “Prod. Order Line” OnAfterGetRecord.
recILE5.RESET;
recILE5.SETRANGE(recILE5.“Prod. Order No.”,“Prod. Order Line”.“Prod. Order No.”);
recILE5.SETFILTER(recILE5.“Item Category Code”,’%1|%2’,‘PM’,‘MFG-CON’);
recILE5.SETFILTER(recILE5.Positive,‘YES’);
recILE5.SETFILTER(recILE5.“Entry Type”,‘Transfer’);
// recILE5.SETFILTER(recILE5.“Item No.”,“Item Ledger Entry”.“Item No.”);
IF recILE5.FINDFIRST THEN
BEGIN
PMQty := recILE5.Quantity;
recLocation3.RESET;
recLocation3.SETRANGE(recLocation3.Code,recILE5.“Location Code”);
recLocation3.SETRANGE(recLocation3.Code,“Prod. Order Line”.“Location Code”);
recLocation3.SETFILTER(recLocation3.“Subcontracting Location”,‘yes’);
IF recLocation3.FINDFIRST THEN;
END;
recILE6.RESET;
recILE6.SETRANGE(recILE6.“Prod. Order No.”,“Prod. Order Line”.“Prod. Order No.”);
recILE6.SETFILTER(recILE6.“Item Category Code”,’%1|%2’,‘PM’,‘MFG-CON’);
recILE6.SETFILTER(recILE6.Positive,‘YES’);
recILE6.SETFILTER(recILE6.“Entry Type”,‘Transfer’);
recILE6.SETFILTER(recILE6.“Entry Type”,‘Positive Adjmt.’);
recILE6.SETFILTER(recILE6.“Location Code”,’%1|%2|%3|%4’,‘ST-PKT01’,‘RST-MYS01’,‘BR-BNR01’,‘BR-CHM01’);
// recILE6.SETFILTER(recILE6.“Item No.”,“Item Ledger Entry”.“Item No.”);
IF recILE6.FINDFIRST THEN
PMReturnQty := recILE6.Quantity;
recILE9.RESET;
recILE9.SETRANGE(recILE9.“Prod. Order No.”,“Prod. Order Line”.“Prod. Order No.”);
recILE9.SETFILTER(recILE9.“Item Category Code”,’%1|%2’,‘PM’,‘MFG-CON’);
recILE9.SETFILTER(recILE9.Positive,‘no’);
recILE9.SETFILTER(recILE9.“Entry Type”,‘consumption’);
// recILE9.SETFILTER(recILE9.“Item No.”,“Item Ledger Entry”.“Item No.”);
IF recILE9.FINDFIRST THEN
BEGIN
PMConsumptionQty := recILE9.Quantity;
recLocation6.RESET;
recLocation6.SETRANGE(recLocation6.Code,recILE9.“Location Code”);
recLocation6.SETRANGE(recLocation6.Code,“Prod. Order Line”.“Location Code”);
recLocation6.SETFILTER(recLocation6.“Subcontracting Location”,‘yes’);
IF recLocation6.FINDFIRST THEN;
END;
recILE10.RESET;
recILE10.SETRANGE(recILE10.“Prod. Order No.”,“Prod. Order Line”.“Prod. Order No.”);
recILE10.SETFILTER(recILE10.“Item Category Code”,’%1|%2’,‘PM’,‘MFG-CON’);
recILE10.SETFILTER(recILE10.Positive,‘no’);
recILE10.SETFILTER(recILE10.“Entry Type”,‘consumption’);
recILE10.SETFILTER(recILE10.“Entry Type”,‘Negative Adjmt.’);
recILE10.SETFILTER(recILE10.“No. Series”,’%1’,‘shortclose’);
// recILE10.SETFILTER(recILE10.“Item No.”,“Item Ledger Entry”.“Item No.”);
IF recILE10.FINDFIRST THEN
BEGIN
PMShtcQty := recILE10.Quantity;
recLocation7.RESET;
recLocation7.SETRANGE(recLocation7.Code,recILE10.“Location Code”);
recLocation7.SETRANGE(recLocation7.Code,“Prod. Order Line”.“Location Code”);
recLocation7.SETFILTER(recLocation7.“Subcontracting Location”,‘yes’);
IF recLocation7.FINDFIRST THEN;
END;
I am not able to attach the sections n output screen also… its giving some error [:(]