Print Page | Close Window

Linking dataset to report using SQL CE

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=4684
Printed Date: 29 Apr 2024 at 3:03am


Topic: Linking dataset to report using SQL CE
Posted By: Dlifes
Subject: Linking dataset to report using SQL CE
Date Posted: 31 Oct 2008 at 6:33am
Hi,
 
I am trying to create a crystal report using VS Studio.NET 2008 (WinForm & C#) using a dataset that is linked to a SQL CE db.  This works fine but whenever I try to add a parameter from the .rpt file I get no default values as if there is no link from the dataset to the report.
 
Here is what I did:

1) First created a new SQL CE connection in the Server Explorer

2) Added a DataSet

3) Dragged a table to the dataset

4) Created a .rpt report and added the ADO.NET connenction linked with the SQL CE connection

5) Added some code in the Form1_Load(object sender, EventArgs e) so that the .rpt object is linked with the dataset and hence you can see the results

 
This works fine because when I ran the code I get the data I want but as soon as I try to add a parameter it seems that the .rpt file cannot see the default data. I get blank when I do:
1- Go to Field Explorer
2- Right click on Parameter Fieldsa and press NEW...
3- Select Default Values...
4- Pick a table and column
I am assuming I am missing a datalinking somewhere but not sure where.
 
Any ideas anyone?
 
Thanks...



Print Page | Close Window