BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Changing Crystal Reports (TCrpe VCL) ODBC connections at run

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Andrew Murphy
Guest





PostPosted: Thu Dec 21, 2006 8:13 am    Post subject: Changing Crystal Reports (TCrpe VCL) ODBC connections at run Reply with quote



I was wondering if anyone else has experience with integrating these two.

I'm looking at integrating Crystal Reports XI with a Borland 2006 (C++)
application and have downloaded the TCrpe VCL from the Business Objects
website.

After some fiddling the reports are working, but the problem I have is that
the reports are locked in to the ODBC they were designed with. As the
application can be configured to connect to different ODBC's (via an ini
file), I am wondering if anybody else has achieved this; or if anyone else
has discovered an alternative way to integrate with Crystal.

The closest thing I can find in TCrpe documentation is the LogOnPrivateInfo
method, however this requires an HDBC handle, that appears can only be
gained using the now deprecated SQL functions: SQLAllocEnv() and
SQLAllocConnect() or the newer SQLAllocHandle() function. As we connect to
our database using a TDatabase class, getting an HDBC handle seems to be a
problem.

Furthermore I am not sure if LogOnPrivateInfo will allow a connection to a
different database (ie. not the database that the report was designed with).

I would be eternally grateful to anyone who has achieved something similar.

Regards
Andrew
Back to top
Andrew Murphy
Guest





PostPosted: Thu Dec 21, 2006 8:44 am    Post subject: Re: Changing Crystal Reports (TCrpe VCL) ODBC connections at Reply with quote



After some further researching, I am investigating the Crystal RDC dll for
VC++, and will give it a try.

Any feedback on the problem from those experienced in integrating the two is
still welcome though.


"Andrew Murphy" <andrewm.news (AT) gmail (DOT) com> wrote in message
news:4589ed7d$1 (AT) newsgroups (DOT) borland.com...
Quote:
I was wondering if anyone else has experience with integrating these two.

I'm looking at integrating Crystal Reports XI with a Borland 2006 (C++)
application and have downloaded the TCrpe VCL from the Business Objects
website.

After some fiddling the reports are working, but the problem I have is
that the reports are locked in to the ODBC they were designed with. As the
application can be configured to connect to different ODBC's (via an ini
file), I am wondering if anybody else has achieved this; or if anyone else
has discovered an alternative way to integrate with Crystal.

The closest thing I can find in TCrpe documentation is the
LogOnPrivateInfo method, however this requires an HDBC handle, that
appears can only be gained using the now deprecated SQL functions:
SQLAllocEnv() and SQLAllocConnect() or the newer SQLAllocHandle()
function. As we connect to our database using a TDatabase class, getting
an HDBC handle seems to be a problem.

Furthermore I am not sure if LogOnPrivateInfo will allow a connection to a
different database (ie. not the database that the report was designed
with).

I would be eternally grateful to anyone who has achieved something
similar.

Regards
Andrew
Back to top
Arnie
Guest





PostPosted: Thu Dec 21, 2006 10:25 pm    Post subject: Re: Changing Crystal Reports (TCrpe VCL) ODBC connections at Reply with quote



"Andrew Murphy" <andrewm.news (AT) gmail (DOT) com> wrote in message
news:4589ed7d$1 (AT) newsgroups (DOT) borland.com...
Quote:
I was wondering if anyone else has experience with integrating
these two.

I'm looking at integrating Crystal Reports XI with a Borland
2006 (C++) application and have downloaded the TCrpe VCL from
the Business Objects website.

After some fiddling the reports are working, but the problem I
have is that the reports are locked in to the ODBC they were
designed with. As the application can be configured to connect
to different ODBC's (via an ini file), I am wondering if
anybody else has achieved this; or if anyone else has
discovered an alternative way to integrate with Crystal.

The closest thing I can find in TCrpe documentation is the
LogOnPrivateInfo method, however this requires an HDBC handle,
that appears can only be gained using the now deprecated SQL
functions: SQLAllocEnv() and SQLAllocConnect() or the newer
SQLAllocHandle() function. As we connect to our database using
a TDatabase class, getting an HDBC handle seems to be a
problem.

Furthermore I am not sure if LogOnPrivateInfo will allow a
connection to a different database (ie. not the database that
the report was designed with).

I would be eternally grateful to anyone who has achieved
something similar.

Regards
Andrew

Well, this may not help much. We don't use the VCL component but
use the deprecated C API from long ago so my comments can't be
directly addressed to TCrpe.

We currently support three DB servers; Oracle, SQL Server and
DB2. All reports are designed against an Oracle server, using an
ODBC system DSN. When a designed report is saved, it holds onto
the DSN and probably the login info also. The challenge is to
change this information at runtime. In very general terms, we
get ahold of the report file using the CRPE API and then change
the above mentioned information. This may also include the table
owner and for SQL Server, the initial catalog. Unfortunately, I
don't know how to do this with TCrpe. We gave up on the VCL
control long ago.

Sorry I can't be more helpful.

- Arnie
Back to top
Frank Fulton
Guest





PostPosted: Fri Dec 22, 2006 11:48 pm    Post subject: Re: Changing Crystal Reports (TCrpe VCL) ODBC connections at Reply with quote

I just recently did a Borland BDS2006 and Crystal Report XI project I used
ADO and
Universal Data Link Files, when the DataBase Source changes I just change
the .udl to connect.

Good Luck


"Andrew Murphy" <andrewm.news (AT) gmail (DOT) com> wrote in message
news:4589ed7d$1 (AT) newsgroups (DOT) borland.com...
Quote:
I was wondering if anyone else has experience with integrating these two.

I'm looking at integrating Crystal Reports XI with a Borland 2006 (C++)
application and have downloaded the TCrpe VCL from the Business Objects
website.

After some fiddling the reports are working, but the problem I have is
that the reports are locked in to the ODBC they were designed with. As the
application can be configured to connect to different ODBC's (via an ini
file), I am wondering if anybody else has achieved this; or if anyone else
has discovered an alternative way to integrate with Crystal.

The closest thing I can find in TCrpe documentation is the
LogOnPrivateInfo method, however this requires an HDBC handle, that
appears can only be gained using the now deprecated SQL functions:
SQLAllocEnv() and SQLAllocConnect() or the newer SQLAllocHandle()
function. As we connect to our database using a TDatabase class, getting
an HDBC handle seems to be a problem.

Furthermore I am not sure if LogOnPrivateInfo will allow a connection to a
different database (ie. not the database that the report was designed
with).

I would be eternally grateful to anyone who has achieved something
similar.

Regards
Andrew
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.