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

Rich Text Page Break

Status
Not open for further replies.

bwalvoord

Programmer
Sep 14, 2005
8
US
I am using a single formula field interpreting Rich Text to create the body of my letter in CR XI. CR will not interpret the \page page break. Is there another way to force crystal to insert a page break based on some text in the field (ie., in the text find a replace the ##NewPage!## with " + Chr(12) + ")

 
Thanks lbass, but I that appears to only give me a carriage return and does not create a new page, even when I print it.
 
Sorry, I wasn't thinking. You can't split report sections. It is a little odd to be writing a letter in a formula, and I think you could run into problems doing that. Why not write the letter in a text box and when you've reached a page limit, create a second text box which you place in a separate section. You can then format the first section in the section expert to "New Page After".

-LB
 
There are hundreds of letter templates created in an application and each of these has any number of variables. The letter templates are stored as rich text and when the report is called, Oracle does the bulk of the work replacing each variable with the correct data. Some letters might be only a few sentences, some might be several pages. I rarely care how long they are because the normal page flow is fine. There are a few instances where I have a cover sheet and apart from experimenting with how many carriage returns to enter in the UI, I was hoping to get away with forcing Crystal to create a page break. The "\page" rich text will force MS Word to create a new page and I think this works in some controls, but not in Crystal.
 
What you might do then is create separate formulas like the following:

//{@page1}:
split({@yourformula},<yourpagebreakcode>)[1]

//{@page2}:
if ubound(split({@yourformula},<yourpagebreakcode>)) > 1 then
split({@yourformula},<yourpagebreakcode>)[2]

//{@page3}:
if ubound(split({@yourformula},<yourpagebreakcode>)) > 2 then
split({@yourformula},<yourpagebreakcode>)[3]

Place each of these in a separate section, e.g., group header_a, _b, _c and then format the sections with "new page after."

Maybe someone else will jump in with an alternative approach.

-LB
 
That's what I've been forced to do, I was hoping there was an easier route.

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top