Link to home
Start Free TrialLog in
Avatar of tprogrammer99
tprogrammer99Flag for United States of America

asked on

.NET Crystal Report Not Pulling Data From Database When Run In Crystal Reports XI

Hi,

I am working on a project in which I need to modify some Crystal Reports which resiide wiithin a .NET web application. I do not have access to the web application code, but I have access to the Crystal Reports fles (.rpt). I am attempting to modify the Crystal Reports files in Crystal 11 on my local PC. Since the Crystal Reports were developed with an Oracle database, I first installed the Oracle Client on the PC (Crystal Reports 11 was previously installed), then I copied the TNS names file to my PC. After this, I copied the Crystal Report to my PC, then I opened the report. When I exectuted the "Print Preview" function, the report was generated, but did not pull any data from the database (i.e. all database formula fields that were supposed to be pulled from the database did not show any data, but text fields and formula fields which did not reference the database were showing on the report). Also, when running this report, I was getting the error that the "database file had changed. Proceeding to fix up the report." When I ran the report from within the .NET application, the report generated properly without any problems.

I wanted to check first to see if there was a problem with retrieving data from the database, so I created a new blank report, connected to the Oracle database, and added a couple of database fields to the report. When I previewed the report, the data was successfully pulled data from the database. I also tried executing the "Verify Database" command, and it said that the database was up to date.  I also tried changing the driver to the Oraclle Server driver, and the report still did not pull any data.

Is there some speicial procecedure that I need to follow to get the .NET Crystal Report to generate properly when run from Crystal Reports 11 on my local PC? Why are the database file change errors being thrown when I run the report  on my PC and not when it is run from within the application, and the Crystal report is exactly the same?












Avatar of Mike McCracken
Mike McCracken

Crystal doesn't know where the daabase is.

Try opening the report in Crystal
Click REPORT --> SET DATABASE LOCATION
In the lower half navigate to the database
Select the table or database in both top and bottom and click UPDATE

mlmcc
Avatar of tprogrammer99

ASKER

Hello,

I tried changing the database location, but the report still showed up blank when attempting to preview the data.
I am new to Crystal reports, but I did some more checking, and I believe that the report is being executed from within the web application using the "push" method, where the report must obtain the data from the database via a dataSet. If this is the case, is it possible for me to update or run the report as needed from Crystal Reports 11, or would I have to set up a project in Visual Studio in order to be able to get the report to retrieve the data from the database successfully?
If the report is getting data from a dataset then you would have to create a dataset and connect the report to it.

The report will not retrievve data from the database.

mlmcc
In your opinion, what would be the best way to go about creating the dataset? Would I be able to do this in the full version of Crystal Reports 11, or would I have to do this from within a .NET application?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks.