Leading provider of Account Software
Questions? We got answers!
Support Center > Knowledge base> Article: To show Other UOM in DO Format

To show Other UOM in DO Format

Article ID: 52640 Email Print
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;


related articles

Article Details
Views: 1118 Created on: Aug 07, 2014
Date updated: Aug 07, 2014
Posted in: Delphi

Poor Outstanding