crystal reports and how to change the database name 
Author Message
 crystal reports and how to change the database name

Hello:
        I created a report called tmp.rpt, connected to a ORACLE ODBC source.
 I was able to pullup the report.

        I then made the report come up in VB successfully. I used the
following code snippet to do.

Set CrystalApplication = New CRAXDRT.Application
Set smryReport = CrystalApplication.OpenReport("E:\tmp.rpt")
Set dtlReport = CrystalApplication.OpenReport("E:\tmp.rpt")
'dsn,      service, usr, pass
smryReport.Database.Tables(1).SetLogOnInfo "WI_DATA", "PDO", "aaa",
"bbb"
smryReport.Database.Verify
smryReport.DiscardSavedData
Set CrystalPageEngine = smryReport.PageEngine
smryReport.ReadRecords
<================================================>
        I then created a different DSN, called WI_RPTS, but this time to a
DB2     database.

        I modified the VB code to the following lines, so that it can connect
to the DB2 database.  The following code is not working

Set CrystalApplication = New CRAXDRT.Application
Set CrystalReport = CrystalApplication.OpenReport("E:\tmp.rpt")
CrystalReport.Database.Tables(1).SetLogOnInfo "MA04.PKMS.COM",
"WI_RPTS", "abc", "def"   CrystalReport.Database.Verify<----------->
CrystalReport.DiscardSavedData
Set CrystalPageEngine = CrystalReport.PageEngine
CrystalReport.ReadRecords

        The database verification in the line above which says verify, works
fine.
        But the readrecords line does not and gives me the following error.

        Run-time error '-2147192184 (80047288)':
        Server has not yet been opened.

        I dont know what could be wrong, the crystal application is not
able    to connect to the DB2 database, but works fine with ORACLE.

Do I have to change the rpt file each time I deploy the application at
different client site

Thanks for your time

-Narahari.



Mon, 08 Dec 2003 07:58:42 GMT  
 crystal reports and how to change the database name
I have post a message ("Re: URGENT : CRPE32 (CR8), Subreport And Changing
Server (with SQL Server 7.0)") which can help you. The source code is in
Centura, not in VB and use PE functions.

Woodstock



Quote:
> Hello:
> I created a report called tmp.rpt, connected to a ORACLE ODBC source.
>  I was able to pullup the report.

> I then made the report come up in VB successfully. I used the
> following code snippet to do.

> Set CrystalApplication = New CRAXDRT.Application
> Set smryReport = CrystalApplication.OpenReport("E:\tmp.rpt")
> Set dtlReport = CrystalApplication.OpenReport("E:\tmp.rpt")
> 'dsn,    service, usr, pass
> smryReport.Database.Tables(1).SetLogOnInfo "WI_DATA", "PDO", "aaa",
> "bbb"
> smryReport.Database.Verify
> smryReport.DiscardSavedData
> Set CrystalPageEngine = smryReport.PageEngine
> smryReport.ReadRecords
> <================================================>
> I then created a different DSN, called WI_RPTS, but this time to a
> DB2 database.

> I modified the VB code to the following lines, so that it can connect
> to the DB2 database.  The following code is not working

> Set CrystalApplication = New CRAXDRT.Application
> Set CrystalReport = CrystalApplication.OpenReport("E:\tmp.rpt")
> CrystalReport.Database.Tables(1).SetLogOnInfo "MA04.PKMS.COM",
> "WI_RPTS", "abc", "def" CrystalReport.Database.Verify<----------->
> CrystalReport.DiscardSavedData
> Set CrystalPageEngine = CrystalReport.PageEngine
> CrystalReport.ReadRecords

> The database verification in the line above which says verify, works
> fine.
> But the readrecords line does not and gives me the following error.

> Run-time error '-2147192184 (80047288)':
> Server has not yet been opened.

> I dont know what could be wrong, the crystal application is not
> able to connect to the DB2 database, but works fine with ORACLE.

> Do I have to change the rpt file each time I deploy the application at
> different client site

> Thanks for your time

> -Narahari.



Mon, 08 Dec 2003 22:49:31 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Crystal Reports: Change the name of the report tab

2. Crystal Report Data Connection (Name Change)

3. Q. Crystal Reports (Changing Name of Subject Table)

4. How to change MS Access DB name in Crystal Report

5. Crystal 7 MR1 Changes active data database name

6. changing the name of the database in Crystal

7. Changing Database Names in Crystal SQL Statements

8. Programatically Changing Database Name for Report

9. Crystal Reports GPF after changing database structure

10. Changing Database with Crystal Reports 2.0

11. Crystal Report Database-Change

12. Changing Crystal Report database location at runtime

 

 
Powered by phpBB® Forum Software