Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a report 'defined' as a Web Form (aspx). It is divided into what I have classed as sections, where each section has a heading, optional description, and then either tables (GridViews), charts (user controls with asp:Chart controls), or details (in e.g. HTML definition lists). Currently the report is explicitly populated, i.e. code in Page_Load assigns the DataSource property and calls DataBind on GridViews and Charts, explicitly assigns scalar values to label controls for detail sections.

I would like to build a single data set type object (initially an untyped DataSet, but eventually any object graph) and assign this to a DataSource property on the whole report, and call the report's DataBind method. This should delegate data binding to report sections, e.g. I set the DataMember property on my report's PropertyDetails section to "PropertyDetails", so that the PropertyDetails section renders report values from the "PropertyDetails" data table in my big report data set.

How should I structure my Report page (or Control) to facilitate this? I would ideally like a declarative structure similar to the GridView or DataList control, but without a repeating element, i.e. each report section is different, unlike 'rows' in a GridView or DataList; in fact more like Columns in a GridView.
Posted
Updated 18-Aug-11 11:33am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900