Reporting Services Export places totals in each and every line of detail

JamesDBuskirk
JamesDBuskirk used Ask the Experts™
on
I am a reporting services newbie, with one class and a few months experience under my belt. I have created a basic report using the MS BIDS Tool. I have just added a footer row with Totals to the report. When I do a CSV export from the IE Report Manager, the output file contains the totals IN FRONT of the detail data in EVERY record. When I export in PDF format this does not occur. Here is what I get:

textbox18,textbox19,textbox20,chargelessthan2dollars_2,chargegreater2mill_1,drg,severity,Cases,TotalDays,TotalCharges,chargelessthan2dollars,chargegreater2mill
"388,697","1,612,216","4,430,909,172","2,850",1,1,1,1,7,"177,409",0,0
"388,697","1,612,216","4,430,909,172","2,850",1,1,2,4,36,"497,785",0,0
"388,697","1,612,216","4,430,909,172","2,850",1,1,3,9,106,"1,229,067",0,0

What I desire is:
1,1,1,1,7,"177,409",0,0

with the totals on a separate line at the bottom. Is this a bug I should take up with Microsoft?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
No, I think that behaviour is correct. Because CSV does not have any formatting etc to indicate which row is the total row, all data items are added to each row of the output file. Each row within the CSV file should represent the same type of item, and it's not normal to add a total row at the end of the file.

I would consider allowing the user to hide the totals altogether (or provide another report without totals) then export this version to CSV.

If you absolutely must have a CSV file with a totals line at the end then you could add the totals line into the SQL query using a UNION statement, and then produce a flat report based on that query which can be exported to CSV.
JamesDBuskirkDeveloper

Author

Commented:
I was practicing, so I really don't need the totals. I'll just take them out of the report. Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial