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!

simple grouping problem

Status
Not open for further replies.

tanyasharma

Programmer
Apr 29, 2002
21
US
Hi

I am using group by in my report.My problem is ..when I place field in group section then report shows only first row present in the data table for each group althogh data table has more then one row available for each group value and when I place field in detail section then report shows all rows available in that particular group. I want sum for each group to be shown in my report...How can I do that please reply as soon as possible
thanks
 
I don't know if I've missed something here, but I'm not sure why you'd want a distinct count if you're trying to get a sum of values.

Place your field in the details section. It sounds as if you don't want details, so suppress the details section. Right click the field you want to sum on, insert, summary, select your grouping.

Hope this helps you out, but if you're still dead in the water, please let me know.

Naith
 
personally I am not exactly shure what you are looking for...the obvious answer is to put the field you want in the detail section and sum it....but perhaps you want that sum to appear in the Group header? Also the field you are summing is not the field the group is based on...is it?

Show us a sample of what you want the report to look like and some sample data and we can help you better Jim Broadbent
 
Hi thanks for repsponse

I am here trying to give more details of my problem
table in database is as follows -
_________________________________
customer type quantity Date
--------------------------------
Romy A 1 5/12
Romy B 3 5/13
Romy A 3 5/14
Romy A 2 5/25
Sandy B 5 5/10
Sandy A 10 6/05

Now I want to show quantity's sum for each customer group by type ...my result should be as follows -
customer type sum(quantity)
Romy A 6
Romy B 3
Sandy A 10
Sandy B 5

Please help me know to solve this problem
thanks


using two group by in my report first is
Group by {field customer}
second is
Group by {field type}


 
this is pretty straight forward

Group1 by {table.cust}
Group2 by {table.type}

Group 1 header (suppressed)
Group 2 header (suppressed)
details (suppressed)
Group 2 footer - place 3 fields

{Table.cust}{Table.type} sum({Table.quantity},{Table.type})

Group 1 footer (suppressed)

You can place the column headings in the page header

the simplest way to get the sum for Group 2 footer is to place the field {Table.quantity} in the suppressed detail section then use the Summary button (looks like Greek symbol (Epsilon?) in the toolbar) to place the sum in the Group 2 footer. Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top