Print Page | Close Window

[CR .NET Visual Studio 2008]setDataSource

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3305
Printed Date: 01 May 2024 at 12:58pm


Topic: [CR .NET Visual Studio 2008]setDataSource
Posted By: Patrick
Subject: [CR .NET Visual Studio 2008]setDataSource
Date 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....?

Thanks
Patrick



Replies:
Posted By: hilfy
Date 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.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: BrianBischof
Date 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>



Print Page | Close Window