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

Adding two fields and forcing a carriage return?

Status
Not open for further replies.

dhv919401

Programmer
Apr 26, 2004
34
CA
The formula in the format field - Display string in a crosstab is:

stringVar Result;
Numbervar AfterDistribution;
whileprintingrecords;
AfterDistribution:= currentfieldvalue - val({@DistributionAmount});
Result:= TRIM(totext(currentfieldvalue,1))+ CHR(13) +TRIM(totext(AfterDistribution,1));
Result;


For some reason the carriage return is not effective. It is not forcing the second field to print on a new line.

Any thoughts?

Thank you for your help in advance,
 
Try an ampersand

Also what version of crystal?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
I tried ampersand and also CHR(10) (Line feed). I am using Version 9.0
 
The carriage return only works if you can use "can grow" on the field, and you can't in a crosstab. You have to manually adjust the height of the field by dragging its boundaries.

-LB
 
I tried manually adjusting the field width. But unfortunately, the value is pushed to the farmost left but not wrapping around.
 
Did you try adjusting the field height?

I do know that in CR 10, and probably in CR 9 that fields in crosstabs wrap when they shouldn't (after manual increase to field height), or are cut off. I believe there was a hotfix for this (though I didn't install it). You might want to check for hot fixes on the Business Objects site if this is an issue for you.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top