473,320 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

discrepancy between data in dataset and data reported by Crystal viewer

JK
In my Windows form, I have a discrepancy between what the CrystaReport
viewer displays and what the dataset contains. The Report displays data
from three fields from same table but the reportviewer displays all the data
in the table regardless of the select I run (in this case, the select
returns only one record):

test MyRpt = new test();
DataSet DS_MyReportsDS = new DataSet();
SqlConnection SQLConn = new SqlConnection("Data Source=localhost; Integrated
Security=SSPI;" +
"Initial Catalog=invoicing");
string strThisQuery = "select clientid,fname, lname1 from clientdata where
clientid = '00001' "; //I should only get one record but the viewer
displays all of them
SqlDataAdapter MyDataAdapterClients = new SqlDataAdapter (strThisQuery,
SQLConn);
MyDataAdapterClients.Fill(DS_MyReportsDS);
MyRpt.SetDataSource (DS_MyReportsDS);
crystalReportViewer1.ReportSource = MyRpt;

I didn't save the report with the data.

Thanks.
Nov 15 '05 #1
4 1479
hey.. change ur system clock!!!

"JK" <NONE> wrote in message news:#K**************@tk2msftngp13.phx.gbl...
In my Windows form, I have a discrepancy between what the CrystaReport
viewer displays and what the dataset contains. The Report displays data
from three fields from same table but the reportviewer displays all the data in the table regardless of the select I run (in this case, the select
returns only one record):

test MyRpt = new test();
DataSet DS_MyReportsDS = new DataSet();
SqlConnection SQLConn = new SqlConnection("Data Source=localhost; Integrated Security=SSPI;" +
"Initial Catalog=invoicing");
string strThisQuery = "select clientid,fname, lname1 from clientdata where
clientid = '00001' "; //I should only get one record but the viewer
displays all of them
SqlDataAdapter MyDataAdapterClients = new SqlDataAdapter (strThisQuery,
SQLConn);
MyDataAdapterClients.Fill(DS_MyReportsDS);
MyRpt.SetDataSource (DS_MyReportsDS);
crystalReportViewer1.ReportSource = MyRpt;

I didn't save the report with the data.

Thanks.

Nov 15 '05 #2
Hi JK,

In your code, MyRpt is an instance of "test" type. Is "test" a kind of
ReportDocument? If it contains the schema of all the columns, the
CrystalReportViewer will display all the data in the table regardless of
your select.

In addition to posting your question here, also look at
http://www.crystaldecisions.com/. Though it ships with Visual Studio,
Crystal Reports is supported by Crystal Decisions. They have a self-help
section and they offer phone & e-mail support. Their web sites states that
you get two Crystal incidents with the purchase of Visual Studio .NET.

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 15 '05 #3
JK
"test" is test.rpt, a Crystal report. What would I need to do so the
CrystalReportViewer displays just the data in my Select? Is the change in
the code or in the report creation?
Thanks.

"Kevin Yu" <v-****@online.microsoft.com> wrote in message
news:H1**************@cpmsftngxa06.phx.gbl...
Hi JK,

In your code, MyRpt is an instance of "test" type. Is "test" a kind of
ReportDocument? If it contains the schema of all the columns, the
CrystalReportViewer will display all the data in the table regardless of
your select.

In addition to posting your question here, also look at
http://www.crystaldecisions.com/. Though it ships with Visual Studio,
Crystal Reports is supported by Crystal Decisions. They have a self-help
section and they offer phone & e-mail support. Their web sites states that
you get two Crystal incidents with the purchase of Visual Studio .NET.

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 15 '05 #4
Hi JK,

I think you have to change the schema of your test.rpt file. Make sure it
has the same schema as you datasource.(Make it contains only 3 column you
need.)

In addition to posting your question here, also look at
http://www.crystaldecisions.com/. Though it ships with Visual Studio,
Crystal Reports is supported by Crystal Decisions. They have a self-help
section and they offer phone & e-mail support. Their web sites states that
you get two Crystal incidents with the purchase of Visual Studio .NET.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Robert Schuldenfrei | last post by:
Hi Again, Forgive me for posting this again, but old items seem to get little review. I thought I could adjust the viewer properties without any further aid from the NG, but I was wrong. When...
3
by: Thad | last post by:
I'm new to C# and I was trying to create a Crystal Report. I've designed a simple report and I've used several methods for attaching fields to the report at design time. I've used a DataSet that...
2
by: Ceri | last post by:
I have been trying to display dataset data in a Crystal Report in a Crystal Reports Viewer using VB.Net. Displaying the data from the default xtreme.mdb Access database was no problem, but when...
0
by: Chris | last post by:
I finally got my report to be recongized, that login issue is terrible. Using VS.NET 2003, created report inside of it. Now when I attempt to display the report is blank (missing data, though I can...
3
by: jason | last post by:
I'll try to explain in detail what it is I'm struggling with. I created a SQL database with one table called CallSheet which contains the following columns: Caller ID: <--Primary Key, auto...
0
by: Helen | last post by:
I have a simple oledb dataset on one windows form in vb .net 2002 calling one column from oracle 7, results appear in a text box But, only the first results appears. Goal is to show all results...
2
by: krunom | last post by:
Hi, i am a newby in Crystal Reports design, and i wrote a c# windows form application that creates a DataSet. And, now i want to pass this DataSet to CrystalReport (via DataSource?) and i do...
0
by: AboutJAV | last post by:
I created a crystal report with the report.rpt reportdata.xsd I created the a new dataset with the reportdata myreportdata = new reportdata(); That automatically created a new dataset...
0
by: dilchahatahai | last post by:
Hi I am having a problem with crystal report . I can create a crystal reports . (new crystal report ->new->standerd->create new connection->dataset->choose data set->choose table ->add report...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.