_report = ReportViewer1.Report
_report.DataSource = ds.Tables(0).DefaultView
The current report also uses groups to group hierarchial data. I would like to either convert this report, or create a newer report class for the above mentioned reasons. So I have some questions about the table control.
1) Initially, it looks like I have to bind a datasource to the table and not to the report anymore. Is that true and if so, how do I programmatically bind the datasource defined in my aspx page to the table in the report of the reportviewer?
2) Some column headings from the original report span multiple columns of the detail section. I would assume to get the same effect with the table control I could merge columns. However, I was unable to figure out how to merge adjacent cells in either the table header or detail. How is that accomplished?
3) When I added a row grouping to group by a field in my datasource, the designer appeared to bunch the grouping into a single column that spanned a couple of rows. I just have 2 layers of simple grouping I need to perform for the report, and I would expect for the group row to span the length of the table, but it doesn't. What is the proper way to add row groupings to the table control?
4) My current report has aggregate sums and calculations in the group headers of the different groupings. How do I associate those cells with the same grouping scope?
5) It appears that the demos use the crosstab and not the table control. I understand they are similar, but the crosstab has sections that I don't feel I need for this type of report. Is there an example of a table report that uses groupings that I could download and learn from?
An example layout of the report I am working is similar to this:
Segment 1 total1 total2 total3 total4
Division 1 total1 total2 total3 total4
Plant 1 data1 data2 data3 data4
Plant 2 data1 data2 data3 data4
Division 2 total1 total2 total3 total4
Plant 2 data1 data2 data3 data4
Plant 2 data1 data2 data3 data4
Any answers, help, or examples would be most appreciated.
-kenf-