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!

List multiple records & Summarize those records

Status
Not open for further replies.

lpedde

Programmer
May 16, 2001
10
US
I have a SQL 6.5 stored procedure that writes to a table records that contain
Chapter Number
Member Name
Payment Type (New1yr, New2yr, Renew1yr, etc)
Rebate based on Payment Type

The same stored procedure writes to another table a single record for each chapter with chapter totals summarized from the first table.
Chapter Number
New1yr total count
New1yr total rebate
Renew1yr total count
Renew1yr total rebate
...

I need the report to look like this grouped by chapter number.
Chapter 0044 header
MEMBER NAME PAY TYPE REBATE
Member1Name New1yr 1.00
Member2Name New1yr 1.00
Member3Name Renew1yr 1.00
Member4Name Renew3yr 3.00

<New Page>
Chapter 0044 Summary
NEW NEW RENEW RENEW
PAY TYPE COUNT REBATE COUNT REBATE
1 YEAR 2 2.00 1 2.00
2 YEAR 0 0.00 0 0.00
3 YEAR 0 0.00 3 3.00
...

<New Page>

Chapter 0066 Header
...

I have the payment list in details 'a' and have tried a subreport in details 'b'for the summary. I can not get the format to be list for chapter1 followed by summary for chapter1 followed by list for chapter2 followed by summary for chapter2, etc. What I get is the list for chapter1 followed by all the chapter summaries and no lists for any other chapters.

Hope this is clear. I'd appreciate any help.
Lpedde
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top