Print Page | Close Window

Crystal report display data that is not consistent

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=2710
Printed Date: 18 May 2024 at 10:42pm


Topic: Crystal report display data that is not consistent
Posted By: crystalelle
Subject: Crystal report display data that is not consistent
Date Posted: 26 Mar 2008 at 12:59am
Hi,

Good day to all of you. I am facing a weird problem so weird that I kept telling myself it is not possible. I am using crystal report in visual basic.net 2005 professional edition. I created a simple report which I drag and drop from the ADO.net database that I have connected earlier. The data output in the crystal report is not consistent with the data in the database. No error nothing at all that is why I don't have any idea how to troubleshoot it. Below are the error data.

Database CustomerID write = AA001S, AB001S, AC002S

Crystal reports CustomerID write = green, blue, yellow

Please tell me what is going on if you have any clue I troubleshoot for whole day and I am clueless.

Thanks




Replies:
Posted By: hilfy
Date Posted: 26 Mar 2008 at 3:41pm
The report is using the default data that VS sets up for a report based on a data set.  This means that the data source for the report is not connecting to the application run-time data, but to the design-time data.
 
When you select a project DataSet when designing a report, Crystal allows you to design the report based on the class of the DataSet.  When you run a report, the data is in an object of the class.
 
You need to set the DataSource for the report to the instance of the DataSet object that's used by your application.  There are a couple of ways of doing this depending on which report object model you're using - CrystalViewer or ReportDocument.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: crystalelle
Date Posted: 26 Mar 2008 at 6:55pm
Hi,

Thanks for the reply cause from the moment I encounter this problem I am the one that is going crazy. I am using crystalviewer for my program.

Please teach me how to fix the problem.

Thanks


Posted By: hilfy
Date Posted: 27 Mar 2008 at 12:32pm
I haven't really worked with the CrystalViewer object model - we use the ReportDocument.  However, if you go to the developer library here:
http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm - http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
and click on the following to get to some sample code that will show you how to do this:
1.  Crystal Reports .NET SDK
2.  .NET Developer Guide and API Reference
3.  Tutorials and Sample Code
4.  CrystalReportViewer Object Model Tutorials
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window