Click to See Complete Forum and Search --> : How to set Datatable as the DAtasource for the report??


adidas
September 21st, 2006, 03:58 AM
Hi all,

I'm using C# in Visual Studio 2005.

I was able to generate reports using Crystal Reports.
Previously, the data source for the report was a table in my DataBase. I used the SetDataSource() function and could set the data source for the report.

Now the problem is, I need to get another report, for which there is no table available in my Database. Instead, I created a Datatable dynamically and I was trying to make this Datatable as the DataSource for the report.
But there was nothing displayed in the report. It was just a blank sheet.

My Datatable, say DummyTable has data in it and I used...

report1.SetDataSource(DummyTable);
reportviewer1.ReportSource = report1;

What could I have missed!

Thank you.