Solved

right align columns in a printout

Posted on 2002-04-23
7
216 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
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

773 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