Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Data Connectivity
Message Icon Topic: Data not showing up Post Reply Post New Topic
<< Prev Page  of 2
Author Message
Ralph55
Newbie
Newbie
Avatar

Joined: 21 Dec 2012
Online Status: Offline
Posts: 9
Quote Ralph55 Replybullet Posted: 22 Feb 2013 at 2:31pm
Hi, Dell,

I'm sorry, but I had to modify part of my program to make it more user friendly, and make / implement a help system. It is now in alpha testing, with no reports. I feel for it to be truly useful, it has to have reports.

Your code helped some, as I get the idea, but I'm still having trouble. Your code looks like it's either C# or C++, and these aren't my strong points. I'm working in VB.

I think you are creating a report, making an instance of it, so you can work with it programmatically. You set its data source to a dataset. Am I right?

When you do it like this, how do you design the layout of the report?


Thanks,

Ralph
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 25 Feb 2013 at 3:31am
That's exactly what I'm doing and yes, the code is C# - I don't do VB.  I design the layout of the report in Visual Studio and connect it to the DataSet that's defined in the project.
 
-Dell
IP IP Logged
Ralph55
Newbie
Newbie
Avatar

Joined: 21 Dec 2012
Online Status: Offline
Posts: 9
Quote Ralph55 Replybullet Posted: 01 Mar 2013 at 2:36pm
Hi, Dell,

I got a simple report working! I'm having trouble with a report based on two tables. In the databaase expert, I select the tables I want, and I get a window showing how the tables are related, and it is right, so I go to the design part. Both tables are there with all of their fields. I pick the ones to display.

In my code, my SQL for my dataset is SELECT tblNames.Last, tblNames.First, tblNumbers.Phone FROM tblNames INNER JOIN tblNumbers ON tblNames.ID = tblNumbers.NameID where tblNames.ID = 2"

When the report displays, I get both records. Only one record in tblNames has an ID = 2, and only one record in tblNumbers has a NameID = 2

I changed the where clause in my SQL statement to tblNames.ID = 10, and still got both records on the report.

I even took out the rpt.SetDataSource(ds) line, and still get both records on the report.

What is wrong?


Thanks,

Ralph

Edited by Ralph55 - 02 Mar 2013 at 7:57pm
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 04 Mar 2013 at 3:40am
If you run the same query in, for example, SQL Server Managment Studio, what do you get for results?
 
What type of connection are you using - ODBC or OleDB?
 
-Dell
IP IP Logged
Ralph55
Newbie
Newbie
Avatar

Joined: 21 Dec 2012
Online Status: Offline
Posts: 9
Quote Ralph55 Replybullet Posted: 04 Mar 2013 at 7:14am
Hi,

I don't have SQL Server. I'm using OleDB with the JET 4.0 engine to connect to an Access dB.

When I make a new query in VS and enter that SQL statement, it works as expected. It also works as expected inside Access.

Ralph
IP IP Logged
Ralph55
Newbie
Newbie
Avatar

Joined: 21 Dec 2012
Online Status: Offline
Posts: 9
Quote Ralph55 Replybullet Posted: 06 Mar 2013 at 7:08am
Hi, Dell,

Can I send you the dB, the SQL statement, and the report to see if you can get it to display only the record returned in the dataset?


Thanks,

Ralph
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 06 Mar 2013 at 8:55am
I'll pm you my email address but I'm not sure when I'll have time to look at it - I'm getting married this weekend so in the next hour or so I'm going off-line until probably next Thursday.
 
-Dell
IP IP Logged
<< Prev Page  of 2
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.031 seconds.