Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing decimal values in column form.

Status
Not open for further replies.

KLinC

Technical User
Jan 8, 2001
5
AU
I am trying to print a report which requires a dollar value column.
I have no trouble tabbing the text columns but cannot line up the decimal points on the dollar value column. The dollar value outputs are calculated.
i have tried all the trim options, also the conversion to text but still cannot line up the decimal points.
I am using Foxpro for Windows 2.6.
I have had no difficulty doing this using the Dos version but would like to be able to control the Windows output with the same accuracy.
I am not using any report generator but am writing the code directly.
Any suggestions please - I have the feeling that the answer will be simple.
It is just that I must be simpler.
 
Have you tried this..
TRANSFORM(myValue,"999,999,999.99")
This function transforms the numeric value to alphanumeric value with proper spacing. Look into the help on TRANSFORM command for more help.
Best of luck !
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Sound to me like your using a proportional font.
The width table for each character is different.
Just as a 'W' is wider than an 'I', a 9 is wider than a 1

And zero suppression (spaces) just compounds the problem.

Try switching to a fixed font i.e Courier.

You might want to consider the FoxPro Report Writer. It handles point justification.

Hopes this helps...

Ed

Sometimes your the windshield... sometimes your the bug.
 
Thank you so very much.
I really feel part of a group when I receive responses like I have.
I will not have time to test them out for some time but will get back with my results.
Thanks again.

'The ancient algorithmist'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top