Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to compose a String formatted in Columns

Status
Not open for further replies.

tful282

Programmer
Jun 26, 2001
42
US
I need to create a string from several db fields- name, units, lower and upper- so that the fields appear to be in columns- i.e. directly above one another.
WATER CC 0 100
GAS MCF 20 40
OIL GL 0 10

I tried using various string functions :
{NAME}+ Space(20-Length (Trim({NAME})))+{UNITS}+Space(20-Length(Trim({UNITS})))....
but this does not perform the way I need.
Any ideas?
 
Are you sure this is the best approach to your problem? Why can't you just place the fields directly on the report canvas and left justify them?

-LB
 
I can't use this approach because this string is to be the row desription in a cross tab report, and as far as I am aware there is no way to present multiple items within a row.
 
I think your formula is fine. The problem is with the proportional fonts. I just tested this with Courier and the columns then align.

-LB
 
PS--You should probably also eliminate the "trim" from your formula or else use "trim" in each component of the formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top