right align columns in a printout

I have created some printouts for a client of mine and I'd like to right align some of the output in the columns.

How would I do this? With some sort of formatting? Could someone provide a very simple example?

Thanks much in advance.
LVL 13
samic400Asked:
Who is Participating?
 
corvanderlindenConnect With a Mentor Commented:
You could use

format("ww", "@@@@@@@@") -> '      ww'
format(123 , "@@@@@@@@") -> '     123'
 
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Before any answer can be suggested, we MUST know how and what do you print?
CHeers
0
 
corvanderlindenCommented:
Or
right$("       " & "ww", 7)
the number of spaces equals 7
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
samic400Author Commented:
It will be integers,dollars or percentages. I'd like it look like so -

test          7
test2        12
test3       450

or

test        12.35
test2        1.23
test3      332.78
0
 
samic400Author Commented:
didn't come out the way I typed it, but angelIII I think you get the idea now, right?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
I think corvanderlinden's suggestion are fine, as long as the font has a equal width for all the caracters. If not, you will eventually need an function that determines the width of the text using a particular font, and then you can determine it's absolute position...

What i wanted to know it rather how you are printing (using your own print commands, using form.print, "printing" to a textbox, printing using MSWord etc).
Depending on this, the answer might differ.

CHeers
0
 
samic400Author Commented:
Thanks for the input too AngelIII. I should have said that I'm using the printer.print command.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.