Reputation: 32525
I'm not quite sure how to do this. I went to the resource: http://www.gotreportviewer.com/, but I couldn't find the exact answer. I'm using VS 2010 .NET Framework 4, so I assume I'm also using ReportViewer2008. Oh, and I am using RDLC files.
They showed a table example where the data was grouped/sorted and they had Group Header and Group Footer's, which seems to be what I want (I think), but I can't figure out how to add those rows to my table.
Basically I have an Object (Registration) which contains:
I pass in an ObservableCollection as the Object DataSource. What I want to do is this:
[GroupName]
[First Name] [LastName]
Total: ##
...
Grand Total: ##
Basically, sort by: GroupName, then FirstName, then LastName. I think the way I need my data grouped/sorted is self-explanatory. I have the sorting down pact, but I can't filter/repeat the data. And, I'm not sure how to get Total / Grand Total. I'm sure I could figure out Grand Total, but Total... I have no idea.
Upvotes: 0
Views: 4268
Reputation: 11
I was having trouble with the Grand Total. I'm using VS2010 and finally I found out how to add a Grand Total to my report. I only have one group so I selected the little down arrow next to 'Group1' at the bottom of the screen, where it says 'Row Groups'. Then selected 'Add Total' and then selected 'After'. This added a row to the bottom with an expression like: Sum(field). I changed this to Count(field), which is what I needed, field being the field needed for the Grand Total.
Upvotes: 1