Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Connection error with Crystal Report XI, VB6 and Sybase ASE15

Hello !

I have an error #4002 when I want to launch a report in VB6 with the ActiveX Crystal Report Viewer.

I use Sybase ASE 15 with an ODBC link and the reports run stored procedures.

This error seems to be an authentification error, but I don't know what parameters are missing or wrong...

- My reports works well in the report designer.

- The reports connected to a text file or an ADO recordset work in VB6.

- The Verify Database works in design mode in VB6.

- The problem is the same with tables, stored procedures, SQL and with or without parameters...

- I tried to connect the report to a DataEnvironnment but I get the same error.

The problem appears when I use the Crystal Wizard to create a form automatically AND when I create objects directly in code like :

    Dim crapp As CRAXDRT.Application
    Dim oReport As CRAXDRT.Report

    Set crapp = New CRAXDRT.Application
    Set oReport = crapp.OpenReport("C:\myreport.rpt")

    CRViewer.ReportSource = oReport

Please help !

Former Member


I don't see any database logon code in what you posted. You need to log onto the database at runtime since Crystal Reports will never store passwords.

You can download and review the [Connection Properties|] document for more information on how to log onto your database at runtime. This document was written for CR9, but it's the same for CR10, CR XI (v11.0), and CR XI R2 (v11.5).

I hope this helps.


Dan Kelleher

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question