>>I am generating a report by using a cursor and one of the fields is an expression field called sugamt. When I print the report, I am getting "***" instead of the calculated value. Here is the query that calculates the field called sugamt by using the IIF() command:
>>
>>
>> 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
>>
>>
>>it seem like the "Products.p_max-Products.p_min" is generating "***" on the report and not showing the calcluation. Anyone knows what is going here? Thanks
>>
>>Nick
>
>1. In VFP9 use CAST function to create a variable with the desired type, e.g.
>
>cast(iif(...) as Integer).
>
>In VFP8 and less use
>
>IIF(..., 0000000000) as myNewField
>
>2. In the report itself check the format property and make the field wide enough.
Thanks again Naomi.
Nick