Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URGENT - Query regarding Crystal Reports and Access 2000.

Status
Not open for further replies.

arpita

Programmer
Nov 5, 2001
2
IN
An application is developed Visual Basic 6 which uses Access 2000 as the database and Crystal report for reports. I've called reports in the VB code using the Action property of the report object. Now, when I run
the application the report does not load and I get the error, "Error : 20599 - Cannot open SQL server ".
I am not using SQL server but while creating reports I use the SQL/ODBC option and then select ODBC - MSAccess Database.
The second problem is that sometimes the report does load but it does not refreshes the data. It always shows the same data. And when I click the refresh button on the report it shows nothing i.e the report is blank. I've
tried all the possible options like :

- Refresh on Every Print option
- Discard saved data when loading reports
- Verify database on every print
- Save data with report etc.

Hope u can help me out of this mess.
 
Hi Arpita,

I have now the same problem :eek:(

Did you find a solution?

Thanks a lot!

Sherlock
 
Try whether the following info. helps you, i got it from a FAQ section:

If re-booting did not help, your ODBC base drivers are probably out of synch. Start the ODBC administrator and click About and make sure all versions match. If they don't, download the latest Microsoft ODBC driver pack at:
Regards
Prasanna
 
Hi
Even I had the same problem connecting to SQL Server
using ODBC.
I could solve this problem after writing this code

CrystalReport1.Connect = "DSN=;PWD=Password;UID=;DSQ="

Because Crystal Report stores all the information within itself ie in rpt file except Password


or
c = CrystalReport1.LogOnServer("pdsODBC.DLL", "Name Of ODBC", "Database Name", "User Name", "Password")

Hope this will be help u


Sanjay
 
Hi

First, why r you using ODBC for data base connection? You can connect your report directly with Access database(mdb file).
At run time using vb code specify the database path like

CrystalReport.Database="Your database path.mdb"

Accessing the database directly is the fastest way to read the data. Crystal Reports only needs to talk to a single data access layer that provides contact with the data. Report results can be obtained quickly in almost any system environment

Second, in the report design in File menu switch off Save Data with Report. When this command is inactive, the data will refresh each time the report is opened. The report will include the most recent data available.

for more info. contact me
kkashwani@rocketmail.com
 
I don't believe the problem is using ODBC to connect to the database. What is probably going on here is a case of DLL hell. I am currently experiencing the hell myself arpita. I connect to a SQL Server database using ADO and am using Active Data to create the report via .ttx file. I have 10 client machines where 9 work perfectly and 1 doesn't (Error 20599 - Cannot open SQL Server) What is most distressing to me is that I have found that this client has an old version of Crystal Reports installed on the machine and several other applications that use Crystal. The problem most likely lies in the dependency of several dll's being of a certain version. I will let you know what I find if you will do the same. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top