discrepancy between data in dataset and data reported by Crystal viewer

  • Thread starter Thread starter Dishan
  • Start date Start date
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."
 
"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.
 
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.
 
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."
 
Back
Top