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

Summary totals not adding up correctly in Report Studio C10.1

Status
Not open for further replies.
Aug 8, 2012
1
GB
Hi,
Hopefully this is a basic question.

I have a report in report studio that looks a bit like this.

ID Desc Item Name Cost

1 ABC A Mr Smith 20
1 ABC A Mrs Smith 20
2 DEF B Mr Jones 40
2 DEF B Mrs Jones 40

Becuase I have more than one name per booking, it brings back a second line with the same information on, after grouping, i have got it to return one line of data so it looks like this.

ID Desc Item Name Cost

1 ABC A Mr Smith/Mrs Smith 20

2 DEF B Mr Jones/Mrs Jones 40


This reflects more accuralty as the total booking cost for Mr&Mrs Smith is £20 and not £40.

When I now try to total the Cost column, it is adding up the £20 twice, one each for Mr & Mrs Smith to show a £40 total, rather than £20, and its doing this for every customer where there is mroe than one name on a booking. Example of what my report is currently doing...

ID Desc Item Name Cost


1 ABC A Mr Smith/Mrs Smith 20

2 DEF B Mr Jones/Mrs Jones 40

Total Summary: 120.00

£120 is wrong as it should show £60.00.
How can I make report studio add up what is showing, rather than all the detail?
All help greatly appreciated. Thank you.
 
Cognos does not know that you consider 2 rows fetched as a single result!!

A simple workaround is to define a count([name] for [id]) and correct the cost for it:

This results in :

10 (20/2)
10 (20/2)
20 (40/2)
20 (40/2)

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top