Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report not printing correctly
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01291514
Message ID:
01291515
Vues:
6
>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.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform