|
Return to Newsletter Contents...
Crystal Reports Repeated Group Headers
by: Kristen St. Jean, BI Specialist, CRCP
Crystal Reports has many
functions that we can take advantage of to create calculations and/or manipulate
the ways that our data displays.
This month we will discuss a
function specific to groups.
In Crystal Reports there is a feature to force group
headers to repeat on each page. This
can be done by checking the box next to "Repeat Group Header on Each Page" on
the Options tab when inserting or changing a group.
When paging through a report where a group spans multiple
pages you can sometimes think you are looking at the beginning of the group when
you're not. What would be nice would be to show the word "continued" on
each group header after the first one for a given group.
Crystal has a function
that can help with this. The function is
InRepeatedGroupHeader
It works like this: if your group spans over multiple pages
and you've turned on "Repeat Group Header on Each page" in the Group Options
dialog box, then you can make your display on the second (third, etc) pages say
"Continued…" This can be done in one
of two ways. First, you could create
a formula and place it in your Group Header.
Example: This
group is based on Country:
if
InRepeatedGroupHeader then
{
Addresses.Country} + " continued..."
else
{Addresses.Country}
The second option is to create a text object next to your
group title that says “Continued…”, then you could conditionally format this
text object by going into the format editor and clicking the X+2 box by
‘Suppress’ and in the suppression formula we would put the following formula:
not
InRepeatedGroupHeader
Both of these will give you the same results with
“Continued..” displaying after your group title if the group spans multiple
pages, so choose the method that you like best.
Go to Top |
Return to Newsletter Contents
|