Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different Databases for a Single Report

Status
Not open for further replies.

CrystalReports9

Programmer
Jan 10, 2003
124
US
Hi

Pls help me....

I have crystal report that I would like to run on different databases, with the user selecting which database supplies the data for the report (the tables are all same in each database but yearwise the data will be differ).

I have successfully done this with a single database using the RDC combined with the LogOnServer method.

Pls give me the solution for multiple database using native oracle database driver dll crdb_oracle.dll

Environment
-----------
Crystal Report 9
ORACLE 8i
Power Builder8.0
Windows NT

Using RDC i am calling CR in PowerBuilder8.

Scenario.
---------
"sales.rpt" is a report can run on database "db1". Because in my development environmenet i use the database "db1" to construct the report. Later while i run the same report on another database "db2" then i got the error "Logon Failed"

Solution please....

Rgs
Antony
 
Use the SetLogonInfo method of a report database table object. Here is a VB RDC sample peace of code, it shouldn't be a big deal for you to convert it to PB.

Dim rpt As New CRAXDRT.Report
Dim t as DatabaseTable
..........
..........
..........
For Each t In rpt.Database.Tables
t.SetLogOnInfo "db2servername", "db2name", "db2uid", "db2password"
Next

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top