This is a migrated thread and some comments may be shown as answers.

Problem getting report to show data

2 Answers 151 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
kilhoffer
Top achievements
Rank 1
kilhoffer asked on 28 Aug 2007, 04:24 AM
Here is my situation. I have a report viewer on an aspx page, and I'm trying to bind programmatically to a DataTable. I'm doing the binding in the page load event, and I've verified the DataTable contains data. Below is the code that performs the binding:

vw_DailyTotalsTableAdapter adapter = new vw_DailyTotalsTableAdapter();
 adapter.Fill(data.vw_DailyTotals);

 report.DataSource = data.vw_DailyTotals;
 report.DataMember = "vw_DailyTotals";
 ReportViewer1.Report = report;
 ReportViewer1.DataBind();

When the report tries to render, I get the following error:

"Column 'RowError' does not belong to table vw_DailyTotals."

Any ideas on how to overcome this or even why its happening would be appreciated!

2 Answers, 1 is accepted

Sort by
0
kilhoffer
Top achievements
Rank 1
answered on 28 Aug 2007, 05:16 AM
Disregard that last post. I moved the databinding code around and it seems to work now. I still dont know what caused it, but its working now.
0
New2UI
Top achievements
Rank 1
answered on 03 Jan 2008, 05:07 PM
Hi there,

I am getting the same error. I have moved around the Databinding but still get the error. Can you please tell me where you moved the DataBinding...

Thanks

Tags
General Discussions
Asked by
kilhoffer
Top achievements
Rank 1
Answers by
kilhoffer
Top achievements
Rank 1
New2UI
Top achievements
Rank 1
Share this question
or