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

Header and Grouping

Status
Not open for further replies.

dscoiho

MIS
Sep 26, 2005
51
US
I am using CR10 and DB2. I have a report that is grouped by region and then grouped by contacts. I have several subreports attached to the region grouping and I have a new subreport linked to the contacts.

I do have a report on main under contact grouping showing the contact's address etc. I then have a subreport linked to that showing last contact date, amount of times been contacted etc. Of course I need all the contacts to show up under region even if no information is available. Which is why I have the subreport.

Currently I am not able to show a header for each page only at the beginning of group or for each contact. The only other solution I have is to have a contact subreport linking to region on main, getting rid of contact grouping, but how would I link the activity report to the subreport. Any ideas or suggestions are appreciated.
 
The problem is unclear. Is it that you can't get subreport headers to repeat on each page? If so, in the subreport, create a formula that includes all records, e.g.:

whilereadingrecords;
1

Insert a group on this formula and set it "repeat header on each page" and then place your "page header" info in this group header.

-LB
 
What I have is my main report that is group by region and then group by contacts.

In the first group I have several subreports linked to the region.

Under the 2nd group I have report that is pulling all the contacts for that region. To assure that I have every contact I have a subreport linked to show information related to that contact.

Example:

Group1
SubReport1
SubReport2 etc.
Headers for Group2
Group2
Report1 "not a subreport" Subreport 1

So my problem is how to get Headers under Group2 Report1 to show only once per page.
 
Are you saying that the subreport that is supposed to ensure every contact is an unlinked subreport to allow you to show contacts that don't exist on the main report? Why not use the table that is in the contact subreport in the main report and then use a left join from that table to the contact address table?

-LB


 
You can't have a report within another report and it not be a subreport, adn you can't link a subreport to another subreport, only to the main report.

LB's guess may be correct, but you must have noticed while inserting the supposed group2 report1 that you had to use insert subreport, so it's unclear what you're trying to say and do.

I would urge you to not specify architecture, rather supply technical information and ask for design and implementation advice, such as:

Example data (what is in the database)
Expected output (what you need to provide)

Subreports are generally a bad idea, and slow, especially at the group level.

-k

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top