Friday 21 April 2017

Dynamic Text "continue on next Page" when data goes more then 1 page

You probably know that Crystal Reports has a 'Keep the group together' option. When this option is enabled, CR will keep the group from breaking across pages where possible. However, since some groups might take up more than one page, there might be times when a page break within a group is unavoidable. There might also be times when you prefer not to enable the 'Keep the group together' option.
When a group overflows a page break, you can help your users by adding a group continuation message to the page footer, as shown in Figure 1.
Figure 1: A helpful message at the foot of the page
To create this message, all you need to do is to drop a simple formula into the page footer band. The formula will look something like this:
IF {Customer.Country} = NEXT({Customer.Country})
THEN {Customer.Country} + " continues on next page"
In this example, Customer.The country is the grouping field. The formula compares the value of that field in the current record (which is the last one to be printed on the current page) with its value in the next record (the first one to be printed on the following page). If the values are equal, the group will be split across the page break; in that case, the formula will return the required message. If they are not equal, the formula will return a null string so no message will appear.

No comments:

Post a Comment

Control Structures (Crystal Syntax) In Crystal Report : If Expressions (Crystal Syntax) in Crystal Report

Formulas without control structures execute each expression in the formula exactly once when the formula is evaluated. The expressions are...