Using existing Connection to SQL-Server in Crystal Report 6 OCX 
Author Message
 Using existing Connection to SQL-Server in Crystal Report 6 OCX

Hi everybody,

I have a stored procedure that creates a temporary table. Now I want
to get the data from this table and use it with Crystal Report 6. The
problem is, that everytime I try to this, the OCX opens a new connection
to SQL-Server. But the temporary table is only available for the connection,
that created it.

Does anybody have an idea, to say Crystal Report not to open a new
connection everytime or better use the existing connection?

Thx
Enrico Ldecke



Sun, 29 Dec 2002 03:00:00 GMT  
 Using existing Connection to SQL-Server in Crystal Report 6 OCX

Hi Enrico,

The OCX cannot do this.  With Crystal 6, the only way to do this is with the API
calls.  There is a call PELogonSQLServerWithPrivateInfo.  This will allow you to
use an existing ODBC connection to your database.

The other suggestion would be with a newer version of Crystal Reports.  This way
you can use Active Data to use against your reports.  This way you can have your
application run the Stored Procedure and then populate a Data Object with the
recordset.  The report will then be able to connect to the Data Object instead
of the database.

--
Sincerely,
Brian Dong

To reply, remove nospam from the address.

Quote:

> Hi everybody,

> I have a stored procedure that creates a temporary table. Now I want
> to get the data from this table and use it with Crystal Report 6. The
> problem is, that everytime I try to this, the OCX opens a new connection
> to SQL-Server. But the temporary table is only available for the connection,
> that created it.

> Does anybody have an idea, to say Crystal Report not to open a new
> connection everytime or better use the existing connection?

> Thx
> Enrico Ldecke



Sun, 29 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

2. Using an existing crystal report, but programmatically redirecting where/how the report gets its data

3. Crystal report using SQL stored proc locks server!!

4. Running Crystal Report Web Component Server and SQL Server on different machines

5. Crystal Web Reports Server 7 string parameters arent being passed to SQL Server StoredProc

6. SQL Server report with Crystal Reports and VB5.0

7. Using Crystal Reports 8.5 to Report Fields From Public Contacts Folder on Exchange 5.5 Server

8. Changing sort of existing report in VB5 using Automation Server

9. Crystal 5 Connecting to 2 ODBC connections (One SQL Server, the other ACCESS)

10. DSN-Less Crystal Connection to SQL Server

11. Crytal report and connection to SQL server

12. CR8 Report Connection/SQL Server 7.0

 

 
Powered by phpBB® Forum Software