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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No Right Trim

Status
Not open for further replies.

omoralez

Programmer
May 1, 2006
23
0
0
US
I have a report where I need to display messages just as they are. This is used to proof the message that will be printed using another software.

I have to merge four fields to create one line of the message, then the next four, etc. for up to six lines. The issue is that I am getting a right trim of blanks, and I don't want that to happen.

{field} + {field} + {field} + {field}

I have also tried to use variables combined message lines with a chr(10) to build a paragraph, and it still suppresses the blanks on the right of the field.

Is there a No RightTrim or something like it?
 
If the field is a VarChar there will not be any blanks.

If you want to pad data in Crystal you will need to add them in the formula

{field} + " " +{field} + " " +{field} + " " +{field}

If you want true field sizes you will need to test length of field

length{field} and use that to calculate how many spaces to addd

Ian
 
trimright() is the function you describe.

'J

CR8.5 / CRXI - Discovering the impossible
 
Actually Trim() trims both left and right, which may work for you, but trimright()is better.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top