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

How do I do the equivalent of a multiple detail report?

Status
Not open for further replies.

Chuin

Programmer
Apr 26, 2003
3
US
This is the structure I'm trying to achieve.

Group Header 1
Group Header 2
Detail 1
Detail 1a
Detail 1b
Subtotal 1
Detail 2
Detail 2a
Detail 2b
Detail 2c
Subtotal 2
Grand Total 1 & 2
 
Group on the unique feature that distinguishes detail 1 from detail 2 to create Group 3. Then the subtotal goes in the Group 3 footer, and the grand total for details 1 and 2, etc., in the Group 2 footer.

-LB
 
Thanks, I've tried that but the results I keep getting are:

Group Header 1
Group Header 2
Detail 1
Detail 1a
Detail 2
Detail 2a
Detail 2b
Detail 2c
Subtotal 2
Detail 1b
Detail 2
Detail 2a
Detail 2b
Detail 2c
Subtotal 2
Subtotal 1
Grand Total 1 & 2


Nothing I do keeps Detail 1's together and Detail 2's together. I've even tried creating a subreport but it does the same thing.
 
I think this means the problem is what field you are using to distinguish your "detail" groups (Group 3). You wouldn't get two instances of Detail 2 if you grouped on a unique field. Also, where are you placing your subtotals? Your last description is confusing, since if you did add a Group 3, it would look something like this:

Group Header 1
Group Header 2
Group Header 3 - Instance 1
Detail 1a
Group Footer 3 - Instance 1 subtotal
Group Header 3 - Instance 2
Detail 2b
Detail 2c
Group Footer 3 - Instance 2 subtotal//etc.

It almost looks like the field you grouped on for Group 3 might be one that can represent a parent or child relationship--and that's why 2 is getting nested within 3. Or are you using only part of a field to group on, e.g., "starts with 'C'"? It would help if you provided more descriptive information about the fields you are grouping on.

-LB
 
Thanks again. I think I've found the trouble. It's not the Crystal structure but the way the data is being shaped in the SQL Stored Procedure. I appreciate your help. You've jump started my brain. After looking at this for so long it's hard to see the forest for the trees! Again, thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top