Passing a connection to Crystal Report 
Author Message
 Passing a connection to Crystal Report

Hello everyone,

    I'd like to know if there is a way to pass a connection (ADO) -
not the connection string - through VB code to the Report. So the
report uses the same connection that is already open. I'll be using
the OCX in VB.

Thankx in advance.



Sat, 21 Feb 2004 22:08:16 GMT  
 Passing a connection to Crystal Report
Hi Allen,

The OCX does not have this ability.  If your ADO connection is using
ODBC, then the RDC and Print Engine API can use that connection by
getting the hdbc handle of the connection.  You would use the
SetActiveDataSource with the RDC and PELogonSQLServerWithPrivateInfo if
you use the PE Calls.

I found an article in Crystal Decision's Knowledge Base that will help
you.  Do a search for article number c2002748 .

--
--
Sincerely,
Brian Dong

To reply, remove nospam from the address.

Quote:

>Hello everyone,

>    I'd like to know if there is a way to pass a connection (ADO) -
>not the connection string - through VB code to the Report. So the
>report uses the same connection that is already open. I'll be using
>the OCX in VB.

>Thankx in advance.



Sun, 22 Feb 2004 12:47:39 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing ADO Connection String to Crystal Report through ASP

2. Passing Parameters from C# to Crystal Report / Crystal Report Viewer

3. Crystal Reports - Report Title Passing

4. Q: Pass a SQL query from VB to crystal report sub-report

5. Passing parameters to a report in Crystal Reports 6

6. Printing Crystal Reports without Crystal Control ActiveX or Crystal Reports API call

7. Passing an open ADO connection as Data Source for a CR report

8. Crystal Report - Error in connection to SQL - Server

9. Crystal Report Data Connection (Name Change)

10. Crystal reports Database connection

11. Stack Overflow: Crystal Reports in VB 3.0 using an ODBC connection

12. Crystal Reports to DB2/2 Connection problems

 

 
Powered by phpBB® Forum Software