Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Report is generated but shows no data Post Reply Post New Topic
<< Prev Page  of 4
Author Message
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 26 Mar 2009 at 10:34am
Sarah,
 
How are you asssigning the dataset to the report?  You need to be sure to set the DataSource of the report to the DataSet in your application prior to viewing the report.  This way it will correctly point to the instance of the DataSet that has data in it.
 
I work with the ReportDocument object model instead of the Crystal Viewer object model.  Here's a sample of what I do in C#:
myRpt = new MyCrystalReport();
rpt.SetDataSource(myDataSet);
viewer.ReportSource = rpt;
 
-Dell
IP IP Logged
sarah7
Newbie
Newbie
Avatar

Joined: 25 Mar 2009
Location: Canada
Online Status: Offline
Posts: 4
Quote sarah7 Replybullet Posted: 27 Mar 2009 at 10:38am
Hi Mitch
 
I have a connection string, it is defined as follows:
 
Data Source=MERLOT\SQLEXPRESS;Initial Catalog=sarah;Integrated Security=True
 
MERLOT is my host, where I am running SQL Server.  'sarah' is the name of my test database.
 
I have been looking into the matter of connection strings and it seems to be an arcane science, not for the uninitiated or fainthearted.
 
I am just wondering, if the Microsoft Reporting is working OK then presumably my connection string is OK, as I'm able to pass the data into my application that way.
IP IP Logged
mitch
Newbie
Newbie
Avatar

Joined: 08 Apr 2008
Location: United States
Online Status: Offline
Posts: 6
Quote mitch Replybullet Posted: 31 Mar 2009 at 4:29pm
Hi Sarah7
 
CR is a learning curve, I agree if you can connect and run MS Reports you are ok. Don't forget to save the CR report, after tweaking changes. Last, I had to manually change in Set Datasource Location ->
Provider: SQLOLEDB
you may want to try the other connection types.
 
IP IP Logged
<< Prev Page  of 4
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.047 seconds.