Page 1 of 1

Mixed Summary / Detail Report

Posted: Wed Oct 08, 2008 4:12 pm
by lionstar
I have been asked to create a report with the following options: Print just the summary, print the detail, print a mix of the summary and detail together.

I have it set up with the Detail report on Page 1, the Summary report on Page 2 and the combination setup to print on Page 3 with c# code to select the page to print based on a variable.

Everything is working except getting the combination page to work the way it is requested. I can get it to work where all the summary will print followed by all of the detail, but they want the summary for group A followed by the detail for group A - mixed together.


Here is what I need.

Code: Select all

Summary

Snacks  (Group A)
	Salty (Group B)
		Hard Ttls (Grp C)		8.00
		Soft Totals 			7.50	
	Salty Totals					15.50

	Sweet
		Hard				3.00
		Soft				4.75
	Sweet Totals					7.75

Snack Totals							23.50

Detail

Snacks
	Salty
		Hard
			Item 1			3.00
			Item 2			5.00
		Hard Totals				8.00
		Soft
			Item 1			6.50
			Item 2			1.00
		Soft Totals					7.50
	Salty Totals						15.50
	Sweet
		Hard				
			Item 1			1.00
			Item 2			2.00
		Hard Totals				3.00
		Soft			
			Item 1			1.75
			Item 2			3.00
		Soft Totals					4.75
	Sweet Totals						7.75

Snack Totals								23.50

Summary

Desserts
	Strawberry
		Frozen Totals			5.00
		Room Temperature Totals		4.00
	Strawberry Totals					9.00
	Raspeberry
		Frozen Totals			3.00
		Room Temperature Totals		2.00
	Raspberry Totals					5.00
Desserts Totals							14.00

Detail

Desserts
	Strawberry
		Frozen	
			Item 1			2.00
			Item 2			3.00
		Frozen Totals				5.00
		Room Temperature	
			Item 1			1.00
			Item 2			3.00
		Room Temperature Totals			4.00
	Strawberry Totals						9.00
	Raspeberry
		Frozen
			Item 1			1.00
			Item 2			2.00
		Frozen Totals				3.00
		Room Temperature
			Item 1			.50
			Item 2			1.50
		Room Temperature Totals			2.00
	Raspberry Totals						5.00
Desserts Totals								14.00
What I am getting is the Snack Summary then the Dessert Summary then the Snack Detail and then the Dessert Detail.

Any ideas on how I can get them intermixed.

Mixed Summary / Detail Report

Posted: Thu Oct 09, 2008 12:16 am
by Lambchop4697
Hey...I am just a fellow user, but without seeing your data table structure, xmlScheme, or even a report sample - all I can do is guess. So, am I guessing correctly that your summary and detail information is correct - it is just in the wrong order? You have shown how you want the report to look, but not how it is showing incorrectly now. If the data is just ordered incorrectly, then perhaps you should double check your layout? I am also guessing that your "summary" data is calculated and not getting pulled from a data source?

So "assuming" that what you have is a single data table and you are using Stimul to summarize, I would think you should create 2 header groups where the first is hidden except for the summary FooterGroup and then then next put the HeaderGroup for your data add your detail. I "believe" that each group is processed in the order of the display so Group 1 goes first and then Group 2, etc. (Vital or Edward should clarify) but that should allow you to analyze the same data multiple times based on the groups.

Hope this gives a hint of something useful.
-Eric

Mixed Summary / Detail Report

Posted: Thu Oct 09, 2008 12:25 pm
by lionstar
I have a single data table that has the groups as columns. Here is what is designed to maybe explain it further.

Summary Section
GroupHeader 1 (Group on Snack/Dessert)
GroupHeader 2 (Group on Type1 (Salty/Sweet/Strawberry/Rasperry)
GroupHeader 3 (Group on Type2 (Hard/Soft)
DataBand (Not enabled, but calc invisible is True)
GroupFooter 3 (Calculated totals by Type 2)
GroupFooter 2 (Calculated totals by Type 1)
GroupFooter 1 (Calculated totals by Snack/Dessert)

Detail Section
GroupHeader 4 (Group on Snack/Dessert)
GroupHeader 5 (Group on Type1 (Salty/Sweet/Strawberry/Rasperry)
GroupHeader 6 (Group on Type2 (Hard/Soft)
DataBand (Enabled to see the individual items)
GroupFooter 6 (Calculated totals by Type 2)
GroupFooter 5 (Calculated totals by Type 1)
GroupFooter 4 (Calculated totals by Snack/Dessert)

It runs through the summary section for Snack then Dessert and then runs through the Detail Section for Snacks and then Desserts

Snack Summary
Dessert Summary
Snack Detail
Dessert Summary

It was written this way because that is the way it was initially requested. (Actually the Detail Section is on Page 1 and the Detail Section is on page 2 and I use C# to enable the page based on a form option)

My goal would be to run this for Snacks Summary (Page 1) and the Snacks Detail (Page 2) and then return to Desserts Summary (Page 1) and then Desserts Detail (Page 2) That would be ideal, but I couldn't figure that out so I took the Summary bands and pasted a copy of them on Page 3 and then took the Detail Bands and pasted a copy onto page 3 after the summary section to see if that would work, but it is still going through all the summaries and when they are done, it goes through all the detail sections.

So you are correct in your statement where I need to analyze the same data multiple times and I am stumped at how to do it.




Mixed Summary / Detail Report

Posted: Thu Oct 09, 2008 12:51 pm
by johnham
Right now you have

PAGE 1: Summary
PAGE 2: Details

and you want to turn on and off PAGE 1 or 2 as options (Maybe something like "Show Detail")

I have two suggestions (and maybe I am WAY off).

OPTION 1
------------------------------------
PAGE 1: SUMMARY
PAGE 2: SUMMARY w/ DETAILS (look at using a subreport maybe)

So you would be writing two reports essentially but you would turn on page 1 or page 2.

OPTION 2
------------------------------------
Forget about splitting the report into multiple pages and write a report with details that works COMPLETELY correct (not trying to split summary and details into separate pages). A subreport might help with this first part. Then use the BeginRenderEvent to hide some of the "Details" based on a variable you set at runtime.

You have 2 unrelated datasets here. There has to be a group or a relation made to make them both work together. A sub report would allow you to have a completely separate report (loosely related) that you can place in your main report and I believe you could enable/disable it based on code or a variable you set.

Can't be of more help without a dataset (yes actual database or XML would help) and a copy of your layout. We know what you want but we don't know what you are doing wrong without being able to recreate it on our end and toy with it.

Thanks,
John Hamilton
POSitive Software Company
http://www.gopositive.com

Mixed Summary / Detail Report

Posted: Fri Oct 10, 2008 7:17 am
by Edward
Hello,

Yes, the idea with SubReports is the best. All components from Page2 can be placed inside of the SubReport. Place the SubReport inside of the GroupFooter1 (CanBreak = true, CanGrow is also true) or inside of the ChildBand after GroupFooter1. Detail Section for each Snack, Desert and so on can be filtered via filter in 'DataBand (Enabled to see the individual items)'.

If you still not getting result you need, please send a report template and data for it to support[at]stimulsoft.com. We could help you with this design.

Thank you.