Question:
Example the base UOM is unit; 10 unit = 1 box. in DO format, user keyin the base UOM as 100, how to show 10 box in report format?
Answer:
In the report designer,
1. Add 2 variable in DO format, example Variable 2 (set as integer for /QTY purpose) and another variable 3 (set as string for other UOM purpose)
2. Calc - detail - before print, paste below script
if DeliveryOrders['UOM3RATE'] <> 0 then
begin
Variable2.Value := DeliveryOrders['ITEMQTY'] / DeliveryOrders['UOM3RATE'];
Variable3.Value := DeliveryOrders['UOM3'];
end
else
begin
if DeliveryOrders['UOM2RATE'] <> 0 then
begin
Variable2.Value := DeliveryOrders['ITEMQTY'] / DeliveryOrders['UOM2RATE'];
Variable3.Value := DeliveryOrders['UOM2'];
end
else
begin
if DeliveryOrders['UOM1RATE'] <> 0 then
begin
Variable2.Value := DeliveryOrders['ITEMQTY'] / DeliveryOrders['UOM1RATE'];
Variable3.Value := DeliveryOrders['UOM1'];
end
else
begin
Variable2.Value := DeliveryOrders['ITEMQTY'];
Variable3.Value := DeliveryOrders['ITEMUOM'];
end;
end;
end;
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article