Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Wrap (Can Grow) Issue Post Reply Post New Topic
Author Message
encoduane
Newbie
Newbie


Joined: 15 Aug 2013
Online Status: Offline
Posts: 2
Quote encoduane Replybullet Topic: Wrap (Can Grow) Issue
    Posted: 16 Aug 2013 at 7:11am
I am having some issues with Crystal breaking (wrapping) a field in the wrong place and I'm wondering how others have dealt with/address this issue.

As an example I have a field that has the following value in it (minus the quotes) - "282.0 mOsm/kg H2O". In some instances, I'm seeing the field wrapped between the "kg" and "H2O" and in other instances, I've seen it wrapped by breaking the "H2O" by leaving the "H" on the top line and the "2O" end up on the second line.

Is there any way to control this so that it does not break text that should be together? Should I write a formula that looks for spaces between text and manually force my own break? Looking for any thoughts or ideas that I might be able to use to address this issue.

Thanks
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 19 Aug 2013 at 1:39am
HI

Is this string is constent or it changes record to record ?

If this is constent value then you need to write a formula to insert a manual new line character to avoide braking in middle.

Example :

left({field},instr({field},"-")&chr(13)&Mid({fiedl},instr((field},"-")+1,len({field})

Thanks,
Sastry
IP IP Logged
encoduane
Newbie
Newbie


Joined: 15 Aug 2013
Online Status: Offline
Posts: 2
Quote encoduane Replybullet Posted: 03 Sep 2013 at 4:53am
It is not static, it changes and comes from a database field.
IP IP Logged
iSing
Newbie
Newbie


Joined: 12 Mar 2013
Online Status: Offline
Posts: 22
Quote iSing Replybullet Posted: 04 Sep 2013 at 3:00pm
Hi encoduane
This might see a bit crazy, but it's worked for me in the past.
Create a formula that contains your dbase field.
In some instances Crystal seems to handle this much better.
 
I would suggest a slight modification to what Sastry has suggested by including a check that looks at the length of the field. 
So if your field width is 15 charcters wide on your report, but the data returned from the dbase could be longer, decide on a consistent point you wish to break the contents, eg at the "/kg H2O" point. 
 
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.