0
Reply

Custom reports from a DataTable in C#/visual Studio 2010

Andrew

Andrew

Aug 17 2010 7:28 AM
5.4k

I have recently installed and begun using Visual Studio 2010. This is for the company I work for, we need this for various reports.
My situation: I retrieve various data from a SQL Server 2005 database. Currently I have written a report routine which exports to Excel as an XML file. This is okay but not ideal.
So, I have been playing around with the ReportViewer and a Report.rdlc file but what I want to achieve is to pass in a DataTable to a sample application and set a ReportViewer to this DataTable, however as far as I can see this cannot be done because the Report.rdlc file has to be defined during design time, correct?
In a nutshell, how can I use the ReportViewer control with a custom DataTable/DataSet, without defining a Report.rdlc file for the various business reports needed?
Thanks,
Andrew