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

Report header on subreport question

Status
Not open for further replies.

BobDennison

Programmer
Jul 28, 2010
24
0
0
US
I saw a post regarding this, but did not understand the suggestion. I have a report that contains 3 different subreports. Each of them are getting data from the same source, just using different selection criteria. I need to let the user drill down into the details to get to the individual records. This all works fine, but there are no page headers on the details. I need to be able to show them the page headers so they know what the data means since it contains different data then the main report shows them. How can I accomplish this? Thank you in advance for your help. Bob
 
Sorry I forgot. I am using Crystal Reports 2008 Version 12.2.0.290
 
In each subreport, in the field explorer->new, create a formula like this:

whilereadingrecords;
""

Insert a group on this formula and format it to "repeat group header on each page. Place the page header labels in this new group header.

-LB
 
I tried this, but it didn't work. What happens when I do this is I get no records back at all. Any other suggestions would be very helpful.

Thank you,
Bob
 
Where are you creating the formula? You should be creating this in the subreport->formula editor->new and then inserting a group on it. It would have absolutely no impact on the records returned.

Please describe the exact steps you have taken.

-LB
 
I thought I followed your instructions, but perhaps I missed something. I have attached a word doc that explains the steps that I took and shows some screen shots of the different results. I hope this helps.

Thanks,
Bob

 
 http://www.mediafire.com/?led9v40isxeei71
Please just copy the word doc into the thread.

-LB
 
I tried to, but the screen shots won't copy. Do you just want the text?
 
The main report collects 4 parameters: Beginning year, Ending year, County, and City. Then it passes these parameters to the sub reports. After retrieving the requested data the sub report portion of the report shows totals by accident year: total accidents, total fatal accidents, total injury accidents, total property damage accidents. It also shows total deaths and total injuries.

The sub report is set up so that you can drill down into the details. When they do I see detailed information about each accident in that year: the accident key (or unique report id), the date and time of the accident, the reporting agency and the police officer who took the report. This individual accident data is what I am trying to create column heading for.

I have attempted several things to accomplish this. First, I duplicated the group heading right below the first group heading. Now I have a Group Header #1a and a Group Header #1b. When I put the new column headings in the Group Header #1b I get close to the results I am after. However, the Group Header #1b headings display before each group record. I don’t want to show the column headings on this page and I can’t just hide them, I can only suppress them. But when I suppress them they don’t show anywhere. Not even on the details page.

If I try hiding the Group Header #1b section it automatically hides both group headings so I don’t get the group records to try and drill down on. Nothing shows.
Now here is what happens when I attempt to do as you have suggested. I insert a new group and put my new column headings in the Group Header #2 section. The result is the same as when I duplicated the Group Header #1 section. I get a group total record then the group title, then a group record, then a group title, etc. Again I can’t drill down to the details, because they are suppressed.

I hope this helps.

Thanks,
Bob
 
The new group must be the highest order group--group #1, and the group must be set up to "repeat group header on each page". The column labels go in this group header #1. For headings during drill down, you must have the subreports set up in file->report options to "show all group headers upon drilldown". I juste tested this and it worked as expected.

You did not describe the steps you took in trying to implement my suggestion in your last post, so I can't tell where you took a misstep, so maybe just start again, following the suggestion step by step.

-LB
 
Okay. I just moved it to the highest group level and it works, but it also shows the column headings from the 2nd group. Is there any way to not show them on the details drill down?
 
Not sure why you have column headings there, but you can use the following to conditionally suppress the gh2 section:

drilldowngrouplevel > 0

...where 0 is before drilldown, 1 is first drilldown, 2 is second level drilldown, etc.

-LB
 
This works fantastically!!!!!!! Thank you, thank you, thank you!!!!!

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top