Aligning output using spaces

Abes

New member
Local time
Today, 08:37
Joined
Jul 2, 2021
Messages
21
I have the following expression in a query from which my report gets its data.

Code:
Left([points].[member] & Space(30),30) & [initials]

The intention is for the concatenated field to appear on the report as follows:

Smith AB
Jones PJ
Nicholson BR

The initials are meant to align directly below one another, but the expression gives me:

Smith AB
Jones PJ
Nicholson BR

This I have to assume this is due to the variable length of the surnames, and to which spaces are added before we get to the initials part. I need the surname to fit into 30 char max and then the initials should be aligned below one another.

What have I got wrong here or is there a better way to do it?

Thanks in advance.
 
Are you using a fixed width font like Courier?
 
As they are separate fields, why concatenate them at all?
Just display as two separate fields and the initials will be perfectly aligned with no additional work and no matter what font you use.
 
or you can put the initial in another textbox.
 
it will Not work, because Calibri font is not Fixed Width (meaning each characters occupy the same width).
 
it will work, yeah.
but is it presentable with Courier font.
actually you can add a Box to your report and use
any Presentable font. see Report Query1.
 

Attachments

Users who are viewing this thread

Back
Top Bottom