Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Mysterious page breaking Post Reply Post New Topic
Author Message
calvin-c
Newbie
Newbie
Avatar

Joined: 18 Dec 2006
Location: United States
Online Status: Offline
Posts: 6
Quote calvin-c Replybullet Topic: Mysterious page breaking
    Posted: 29 Dec 2008 at 10:49am

We’re reporting notes, grouped by author, date, and sequence #, and sorted by page #. (Each note is made up of one or more records depending on the length. All the records in a note have the same sequence # but different page #’s. The sequence #’s start over each day.)

The group 3 (sequence #) header is hidden but it initializes the formula

whileprintingrecords;
global stringvar AllText :=""

Details are also hidden, but builds the AllText variable as:

WhilePrintingRecords;
global stringvar allText;
allText := allText & {notes.notetext};
//If character count is = 250 then field is full and a word is split, no space
//If count is less than 250 then field was trimmed, insert space
If length({notes.notetext}) < 250 Then
    allText := allText & " "

Finally, group 3 footer displays the full note using the formula:

WhilePrintingRecords;
stringvar allNoteText

the formula field is formatted ‘Can Grow’ so the footer is split, with the formula in 3a & a line in 3b. Putting the line in 3a puts it right thru the middle of the note when it grows larger than the ‘design’ field. Making the design field large enough to accommodate an entire note isn’t viable-notes can be as long as an entire page.

(this is the original version, which doesn’t work; the second version, below, doesn’t split the footer but it has the same problem as the first version)

The only group settings (other than hide/suppress) is Keep Together for group 3. The problem is that when we suppress section 3b we get full pages of notes (except when the next note is too long for the remainder of a page). When we don’t suppress it some of the pages are only half full even though there’s plenty of room for the next note.

As an alternative, I tried suppressing 3b & adding the line to the formula as:

WhilePrintingRecords;
global stringvar allText;
allText & ChrW(13)  &

"---------------------------------------------------------------------------------------------"

Didn’t work. Strangely, it works if I omit the line (allText & ChrW(13)) but as soon as I add even a single character to the line (even a space) the problem returns.

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.031 seconds.