Topic: [CR .NET Visual Studio 2008]setDataSource Posted: 30 May 2008 at 12:01pm
Hi! If this topic fits elsewhere better, please feel freen to move it.
I have created a DataTable, filled it with data and want to assign it to my report as the Datasource. But when the programm reaches the statement, it crashes and nothing moves anymore.
report.setDataSource(DT);
report is the Crystal Report and DT is my DataTable. What am doing wrong, or where should i look for errors in my code....?
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Posted: 18 Jun 2008 at 3:35pm
Is this an In Memory DataTable? Is it part of a DataSet? I haven't done this yet in VS2008, but in VS2005 I had to use the DataSet object in report.setDataSource() instead of a specific DataTable object.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 18 Jun 2008 at 6:29pm
I wonder how you originally built the report with the DataSet. Did you create the schema file and use that as the datasource? If so, have you NOT made any changes to the dataset since then? Even the smallest change will give you a mismatch on the dataset on make the report stop working. Plus, to a Verify Datasource to make sure that everything checks out.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum