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

CR 8.5 Show Headers one time in drill down 1

Status
Not open for further replies.

amiroux

IS-IT--Management
Nov 14, 2004
9
US
I'm running Crystal Reports 8.5 and on drill down would like the group header to show only ONCE at the top of each page.

At present, I have GH2 repeating every time there is a value change in GF2 - which is pretty ugly when there are many lines in GF2.

CR 9.0 solves this rather nicely. Any ideas on how do this with CR 8.5 or below?

Thanks.

amiroux


 
What do you have in GH2--a text box or some information that remains the same for each instance of a Group #2? Without knowing your overall design, I think you could conditionally suppress all but the first instance of GH#2 by going to the section expert (format->section)->GH#2->suppress->x+2 and entering:

groupnumber <> 1

You would also check "Hide" for the GH#2 section.

If this isn't what you're looking for, you need to provide more detail about your report structure, etc.

-LB
 
Thanks for getting back to me LB.

The report is relatively simple. Group level 1 is set to the sales person code. The headings for the data are in the Page Header. GH1 is blank.

Group level 2 is the Item#. GH2 contains text field headings, GF2 contains numeric summary totals of units and dollars sold by Item.

Presently, when drilling down on the Sales Person, to see the Item summaries, each line of text field headings in GH2 is repeated for each change in item.

In the Section expert->GH2->Suppress-> I tried entering 'InRepeatedGroupHeader'. But the field headings still repeated with each change in item#.

 
LB:

You're a genious. Thanks. Not sure why it works unless the Group 1 counter changes everytime a new Group 1 value changes.

I did a quick check and it works on the first page perfectly. However, when I have more than one page in the drill down, the header is gone on page 2 and beyond.

Is there a way to know the page number in the drill down so that the top of each page, has the header (once).

 
Format group #2 to "repeat group header on each page" and then try changing the suppression formula to:

Not inrepeatedgroupheader and
groupnumber <> 1

-LB
 
IB, Thanks again.

Where do I indicate "repeat group header on each page". I looked in the Format Section area and couldn't find it.
 
Go to report->change group expert->pick Group #2->options->check "Repeat Group Header on each page". This is where you find it in 8.0, anyway.

-LB
 
Good morning LB.

The location to modify 'Repeat Group Header On Each Page' is in the Report->Change Group Expert in 8.5 as well. thank you. I made the change to GH2.

I also changed the suppression formula in the section format in GH2 to

Not inrepeatedgroupheader and
groupnumber <> 1

Unfortunately, the result was the same. The GH2 headers still show only on the first page of the drill down.

 
Okay, go back to the change group expert and also check "Keep group together" for Group #2. Then create two formulas:

//{@reset} to be placed in the page header and suppressed:
whileprintingrecords;
numbervar grpno := 0;

//{@grpno} to be placed in the group #2 header:
whileprintingrecords;
numbervar grpno := grpno + 1;

Then go to the section expert->GH#2->suppress and enter:
not inrepeatedgroupheader and
{@grpno} <> 1

This tests out here.

-LB
 
To simplify, the suppression formula could just be:

{@grpno} <> 1

-LB
 
Thanks so much LB! It works like a charm at the GH2 level. I've not used the 'counter' feature and your approach has solved the problem and opened new vistas for me.

Is there a way to turn it off at the detail level? The data at this level are different and the field headings need to be different as well.
 
Not sure what you mean. Turn what off? Are you using a detail section_a for headers for the detail section?

-LB
 
Hi LB.

Yes, I have a detail_a for the detail data headers with field names that correspond to slightly different data. (The detail has detailed invoice information, whereas, the GH1 & GH2 data is summary info.)

Thanks for your help.

amiroux
 
You can use the same kind of formulas for the detail section, e.g.,

//{@resetdet} to be placed in the page header and in group header #2:
whileprintingrecords;
numbervar detno := 0;

//{@accumdet} to be placed in the detail_a section:
whileprintingrecords;
numbervar detno := detno + 1;

Then go to the section expert->details->suppress->x+2 and enter:

{@accumdet} <> 1

This would allow the "detail header" to appear at the beginning of a page and the beginning of any new group.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top