Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to suppress auto-trim Crystal Reports 9 Post Reply Post New Topic
Author Message
NoIdea2
Newbie
Newbie


Joined: 18 Dec 2008
Online Status: Offline
Posts: 2
Quote NoIdea2 Replybullet Topic: How to suppress auto-trim Crystal Reports 9
     Posted: 18 Dec 2008 at 2:49am
Hello all,
 
I have a problem which I don't seem to able to solve on my own.
 
I have a string value that has to be displayed in a text field.
The field's alignment has to be centered and my string looks something like this:
 
'                     Max Myers                   Dan George  ' +char(10)+char(13)+
'              (genereal manager)              (assistant)             '
 
where the words in brackets have to be underneath the names. I can't do it any other way for various reasons. It now seems that CR has an automatic right trim for the field, because if I add a character at the last position, I get the field displayed the way I want it to whereas if I just have blanks at the end, they are cut off. Does anyone have an idea on how to do this?
 
Thanks, I really need to solve that soon.
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 18 Dec 2008 at 3:05am
Hi
 
Does the values come for single field ,it is possible to create two separate formulas and include them in single text object.
 
Also please can you clarify whereas if I just have blanks at the end, they are cut off. Does anyone have an idea on how to do this? some sample data will be useful with current result and expected result.....
 
Cheers
Rahul
IP IP Logged
NoIdea2
Newbie
Newbie


Joined: 18 Dec 2008
Online Status: Offline
Posts: 2
Quote NoIdea2 Replybullet Posted: 18 Dec 2008 at 3:12am

Hi,

thanks for the quick reply.

The data comes from a string and has to be placed in one field.

If I have a string like this
 
'                     Max Myers                   Dan George  ' +char(10)+char(13)+
'              (genereal manager)              (assistant)            '
 
(the ___ are blanks) the outcome would be
 
                     Max Myers                   Dan George
                             (general manager)      (assistant)
 
If my string looks like this:
 
'                     Max Myers                   Dan George  ' +char(10)+char(13)+
'              (genereal manager)              (assistant)             f'          
 
then I will get
 
                     Max Myers                   Dan George
               (general manager)             (assistant)              f
 
You know what I mean? I don't have any trim in any formula, but it seems that CR trims the string by itself...or maybe I just miss something.
 
Thanks!
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 18 Dec 2008 at 5:16am
Hi,
 
Just wanted to know if char(10) and char(13) come from string field,What I would suggest is extract parts of string and then concatenate again as you want the display to be .
 
Cheers
Rahul
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum