Normal Topic Aligning Text In Report Columns.. (Read 1169 times)
kim33
Member
*
Offline


No personal text

Posts: 6
Joined: Jun 30th, 2005
Aligning Text In Report Columns..
Jun 30th, 2005 at 10:20am
Print Post Print Post  
Hi,

I am trying to get some text in a report column to match up so when I come to print it out it is all aligned.

Example:

At the moment it prints out like this in my Library No Column...

CD COM 655*17
CD COM 978* 2
CD2 COM 47* 4
CD COM 480* 5
CD1 COM 342* 1
CD2 COM 354*18

But I want it to look like this..

CD   COM 655*17
CD   COM 978* 2
CD2 COM 47* 4
CD   COM 480* 5
CD1 COM 342* 1
CD2 COM 354*18

When I'm typing the information in on the form, I am typing it in with the correct number of spaces that should make it look how I want it to look.  but it seems to be printing it out how it wants it to look.

The reports I am using have been translated from Q&A but I have created some new reports in Sesame but it still does the same.

Can anyone help me out on this one?

Many Thanks

  
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Aligning Text In Report Columns..
Reply #1 - Jun 30th, 2005 at 2:08pm
Print Post Print Post  
Have you tried putting a couple spacers in between each layout element?  Wink
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Aligning Text In Report Columns..
Reply #2 - Jun 30th, 2005 at 5:28pm
Print Post Print Post  
Hello,

Is the value "CD COM 655*17" stored in one element on your form or is it stored in multiple elements?

If it is stored in multiple elements then you can align each one in the report by using the Look tab of the property editor. The Label Alignment is how you set the alignment of elements in a report.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
kim33
Member
*
Offline


No personal text

Posts: 6
Joined: Jun 30th, 2005
Re: Aligning Text In Report Columns..
Reply #3 - Jun 30th, 2005 at 7:09pm
Print Post Print Post  
Hi Ray,

Thanks for replying.

The text "CD COM 655*17" is stored in a field that I call my "Library No." on the form.  It is the number I use when I look up different music.  So I think it would be one element.  When I create my report this comes up with a column of it's own if you know what I mean.

I want the letters COM to match up and all be in the same position as you go down the column like I showed in my first message and not out of sync.

Regards.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Aligning Text In Report Columns..
Reply #4 - Jun 30th, 2005 at 8:58pm
Print Post Print Post  
Hello,

In Designer
Open Your Report
Find the value box that displays the values in "Library No."
The value box will have a name displayed in square braces []. It may be something like LE11. Note this name
Click Program Layout. It is under commands on the left hand side.
In the first Drop down box choose the name that you just took note of.
Type the following code into the programming editor
Code
Select All
ThisElement = @Replace(ThisElement, " ", " ") 


Save the report and run it.
Does it produce the desired results?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
kim33
Member
*
Offline


No personal text

Posts: 6
Joined: Jun 30th, 2005
Re: Aligning Text In Report Columns..
Reply #5 - Jun 30th, 2005 at 10:43pm
Print Post Print Post  
Hi Ray,

GREAT STUFF!!!

This seems to have sorted the prolem out.  Looks alot better with everything lined up nicely.

Is there any chance you might have a solution to my Truncating Topic I posted before this topic?

Many thanks for your help!!!
  
Back to top
 
IP Logged
 
kim33
Member
*
Offline


No personal text

Posts: 6
Joined: Jun 30th, 2005
Re: Aligning Text In Report Columns..
Reply #6 - Jul 1st, 2005 at 7:32pm
Print Post Print Post  
Hi again Ray,

The program you gave me works fine but the only problem I have come across is that if I change the font in the "Library No." element the program no longer works and the "COM" is all over the place again.

The only font it works with is "Lucida Console".

Is it something I am doing wrong?

Manys Thanks.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Aligning Text In Report Columns..
Reply #7 - Jul 1st, 2005 at 8:29pm
Print Post Print Post  
Hello,

Most fonts only take up as much space as is need to print one character. So an 'i' takes up less space then a 'W". An Example of this is below. Both are three characters but the width of one line is much wider than the width of the other line.

iii
WWW

Lucida Console, Courier, Courier New, etc are fixed width fonts meaning that a 'i' takes up the same amount of space as a 'W'. Below I am using the Courier Font. See how they both take up the same amount of space now.

iii
WWW


So to do what you want to do requires a fixed width font.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged