Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List off command
Message
De
15/09/2008 10:10:49
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01347593
Message ID:
01347608
Vues:
9
>>Hi, I have outputted some data to a file for use in a report but the price figure do not align properly and want to know a work around.
>>LIST off job_nbr,' ',ALLTRIM(STR(price,10,2)),' ',ALLTRIM(STR(old_price,10,2)),' ',todaydt for g>1
>>but ends up looking like this depending on length of price value.
>>
>>13T001 7.00 6.00 09/15/08
>>14T001 137.00 6.00 09/15/08
>>15T001 9.00 6.00 09/15/08
>>16T001 2.00 6.00 09/15/08
>
>Well, you just need to use PADR function instead of ALLTRIM(STR( to padr to the number of chars your want and align properly.
>
>LIST off job_nbr,' ',PADR(price,10),' ',PADR(old_price,10,),' ',todaydt for g>1


padr() ?
LIST off job_nbr,'   ',STR(price,10,2), '    ',STR(old_price,10,2), '  ',todaydt for g>1 
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform