Dear all,
Nav version :5.0
we create a report for showing some fields of Capacity Ledger Entry Table,
the command as below:
CapLedgEntry.RESET;
CapLedgEntry.SETCURRENTKEY("Prod. Order No.");
CapLedgEntry.SETRANGE("Prod. Order No.","Production Order"."No.");
CapLedgEntry.SETFILTER("Quantity",'<>%1',0);
IF CapLedgEntry.FINDSET THEN REPEAT
k += 1;
dRoutingDirectCost[k] := CapLedgEntry."Direct Cost";
dRoutingOverheadCost[k] := CapLedgEntry."Overhead Cost";
message('%1...%2',CapLedgEntry."Direct Cost",CapLedgEntry."Overhead Cost");
dRoutingPostingDate[k] := CapLedgEntry."Posting Date";
dRoutingType[k] := FORMAT(CapLedgEntry.Type);
dRoutingLineCode[k] := CapLedgEntry."No.";
dRoutingOperation[k] := CapLedgEntry."Operation No.";
dRoutingLineDesc[k] := CapLedgEntry.Description;
dRoutingLineUnitCost[k] := ProdOrderRoutingLine."Unit Cost per";
dRoutingRunTime[k] += CapLedgEntry."Run Time";
dRoutingStdRunTime[k] += CapLedgEntry."Standard Run Time";
dRountingCapUOM[k] := CapLedgEntry."Cap. Unit of Measure Code";
dRountingQty[k] += CapLedgEntry.Quantity;
UNTIL (CapLedgEntry.NEXT = 0) OR (k = 9);
It can show the correct "quantity","Desc","No."...
But the "Direct Cost" and "Overhead Cost" can't get it ,just show "0"only!
Please help!
Thanks very much!
0
Comments
you have to use CALCFIELDS function to calculate the value
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav