> SELECT Products.p_productname, Products.p_itemcode,; > Products.p_unitsinstock, Products.p_unitsonorder,; > Products.p_totqtyperunit, Products.p_qtyperunit, Products.p_max,; > Products.p_min,; > IIF(Products.p_unitsinstock<=Products.p_min AND Products.p_unitsinstock > 0,Products.p_max-Products.p_min,0) as sugamt; > FROM ; > warehouse!products; > WHERE Products.p_itemcode BETWEEN ?lc_bitem AND ?lc_eitem; > ORDER BY Products.p_productname INTO CURSOR prodrep >>
cast(iif(...) as Integer).In VFP8 and less use
IIF(..., 0000000000) as myNewField2. In the report itself check the format property and make the field wide enough.