Solved

right align columns in a printout

Posted on 2002-04-23
7
213 Views
Last Modified: 2011-10-03
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.
0
Comment
Question by:samic400
  • 3
  • 2
  • 2
7 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6962404
Before any answer can be suggested, we MUST know how and what do you print?
CHeers
0
 
LVL 2

Accepted Solution

by:
corvanderlinden earned 50 total points
ID: 6962435
You could use

format("ww", "@@@@@@@@") -> '      ww'
format(123 , "@@@@@@@@") -> '     123'
 
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 6962440
Or
right$("       " & "ww", 7)
the number of spaces equals 7
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 13

Author Comment

by:samic400
ID: 6962455
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
 
LVL 13

Author Comment

by:samic400
ID: 6962456
didn't come out the way I typed it, but angelIII I think you get the idea now, right?
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6962494
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
 
LVL 13

Author Comment

by:samic400
ID: 6962510
Thanks for the input too AngelIII. I should have said that I'm using the printer.print command.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now