Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List off command
Message
From
15/09/2008 14:27:34
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/09/2008 13:55:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01347593
Message ID:
01347723
Views:
8
>>>>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
>>>
>>>VFP is smarter than you think!
>>>LIST off job_nbr,' ',price,' ',old_price,' ',todaydt for g>1
>>
>>Actually, if you are OK with a single instead of triple space between columns:
>>
LIST off job_nbr, price, old_price, todaydt for g>1
>>
>>That is, a comma in the command (not "," in the ",nd" :) gives you one space, and that's when you have Set Heading Off. With headings, your columns will be at least wide enough to accomodate the column widths, plus one space between.
>
>That was also my first thought, but I wasn't 100% sure, and did not have the chance to test before I responded.

Happens to me all the time - I have something open that I don't want to move just to try something, and if I open another Fox just to try something out, that's already too much for one message, most often. This time it just happened to be possible to check quickly - had an open table and a ready command window at hand... or else I'd have to write a disclaimer, like "not tested, not for children below 45 - small parts, don't do this at home - go to neighbor's, void where prohibited" and such.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform