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

Word Wrap in Crystal v10

Status
Not open for further replies.

SimonPetherick

Technical User
Sep 25, 2002
49
AU
Hi,
I have set-up a basic crystal report in v10. It contains a cross-tab. In the columns along the top, some of the headings are too long for one line so I'd like them to wrap onto the next line. Does anyone know whether I can do this?
Cheers.
 
Right-click, Format Field > Common > Can Grow. Crystal will always 'word wrap' for string data, but only within the defined size, unless you say 'Can Grow'.

Fields can also be expanded vertically so that they have room for two or more lines of text. This can be used along with or instead of 'Can Grow'.



[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
In a crosstab, just select the borders of the label and manually resize the width and height until the label wraps.

-LB
 
The 'Can Grow' button is greyed out so I cannot select it using a cross tab.

For some reason, when I select the borders of the label and manually resize, the text still does not wrap.

Any other ideas????
 
As previously mentioned, you can manually resize the Columns in the preview mode to be a set width and height, once the report is saved, it will retain this.

Otherwise I'm afraid that cross-tab formatting/flexibility has always been a bit weak in CR.

-k

 
I tried manually resizing the columns in preview mode and saving the report, but it still didn't wrap the text.

I've now rotated the text 90 degrees and it seems to wrap ok. The problem I face now is that I'd like the text to be aligned right. However when I click the right align button, since the text is rotated, the text goes to the top of the column box.

So, what I am after is, the text reading at 90 degrees and located in the bottom right hand corner of the column.

Does anyone know how to do that?
 
I guess you didn't resize them vertically and horizontally? It works here...

Well you do have an alternative if it isn't working for some reason, but it's kinda fugly too.

Create a formula such as:

whileprintingrecords;
stringvar MyString:={table.field};
numbervar Counter;
Numbervar BreakPoint:= 10;
If Counter < BreakPoint
For counter := 1 to len(trim({table.field}) do(
if mid({table.field},counter,1) = " " then
MyString:=mid({table.field},1,counter) & chr(13) & mid({table.field},counter+1)
);
MyString

Now the field will break at the first space PRIOR to whatever you place as the breakpoint value.

Just make sure that you resize the column horizontally AND vertically.

-k
 
Thanks.

I entered the formula but crystal says there is an error in the formula - the keyword 'then' is missing

Am I correct in saying 'then' should be placed after:
If Counter < BreakPoint THEN?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top