user100487
user100487

Reputation: 258

Crystal Reports repeats previous groups header together with current header

I have a report made with Crystal Report 10 that is structured like this:

(Note that this example has 1 page with Value A and 2 pages with Value B)

PAGE 1:
Group Header Value A
(Sub)Group Header with some headings for Group Header Value A
Detail section with values for Group Header Value A

PAGE 2:
Group Header Value B
(Sub)Group Header with some headings for Group Header Value B
Detail section with values for Group Header Value B

PAGE 3:
Group Header Value B
(Sub)Group Header with some headings for Group Header Value B
Detail section with values for Group Header Value B

My problem is that when I fill it with data, it displays as follows:

(The Group Header Value A displays also on PAGE 2, together with Group Header Value B)

PAGE 1:
Group Header Value A
(Sub)Group Header with some headings for Group Header Value A
Detail section with values for Group Header Value A

PAGE 2:
Group Header Value A
Group Header Value B
(Sub)Group Header with some headings for Group Header Value B
Detail section with values for Group Header Value B

PAGE 3:
Group Header Value B
(Sub)Group Header with some headings for Group Header Value B
Detail section with values for Group Header Value B

The PAGE 2 should only display Group Header Value B.

How can I stop Group Header Value A from displaying on PAGE 2?

Thanks

POST-EDIT: I actually found a solution to this issue, although since it may not look like a proper solution, I would like to hear of other ways to solve this issue.

My solution is to do as follows: 1. right-click on the Group Header and select "Section Expert". 2. in "Section Expert", tick the checkbox "Underlay Following Sections". This will place any subsequent header on top (on the z-axis) the first groups headers. 3. make sure that the field used for displaying the Group Header data has a black background (and e.g. white text). This way the new subsequent groups names will fully cover the first groups name.

Upvotes: 2

Views: 3808

Answers (2)

Ronak Mathia
Ronak Mathia

Reputation: 21

You have to move GroupHeader into the page header section.
but be sure group must be there. only group header moves to the page header section.
then right click on object and edit formula for display string property.
then put this condition on formula editor.

if ({GroupFiledName} = next ({GroupFiledName}))
then
// if you required group header on each page
{GroupFiledName}
// if you not required group header on each page
''
else
 next({GroupFiledName})

try it.. it worked for me.

Upvotes: 2

Chetan Sanghani
Chetan Sanghani

Reputation: 2111

You have to take the GroupHeaderSection for the subHeader. And supress the GroupHeaderSection With formula DRILLDOWNGROUPLEVEL = 0. In the GroupHeaderSection you can put the Header details for subreports. Thus you can get the different header

Upvotes: 1

Related Questions