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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reports CR 8 to CR 9

Status
Not open for further replies.

newspalm

Programmer
Joined
Apr 25, 2003
Messages
2
Location
RU
Hello, All

presents:
- old reports (CR 8.5)
- CR 9
- MS SQL 2000
- MS IIS 5 (W2K)
- RAS is not installed

My steps:
1. Open old report in Report Designer (CR 9),
Set Datasource Location (choice ODBC "LocalServer1", Database "DB1").

Show SQL Query display:
SELECT "r"."f1", "r"."f2" FROM "DB1"."dbo"."r"

Good. Make preview, save report.

2. Call report from report.asp and set:
Session("SQLUserName") = "sa"
Session("SQLPassword") = ""
Session("CRDSN") = "LocalServer1"
Session("SQLDatabase") = "DB1"

Set mainReportTableCollection = Session("oRpt").Database.Tables
For Each mnTable in mainReportTableCollection
With mnTable.ConnectionProperties
.Item("user ID") = Session("SQLUserName")
.Item("Password") = Session("SQLPassword")
.Item("DSN") = Session("CRDSN")
.Item("Database") = Session("SQLDatabase")
End With
Next

3. All is ok

4. Call this report for other Database (use report.asp)
Session("SQLUserName") = "sa"
Session("SQLPassword") = ""
Session("CRDSN") = "LocalServer2"
Session("SQLDatabase") = "DB2"

5. Report is displayed, but all records from "DB1" (need "DB2"!)


How i can change Database source in asp?
What is wrong?

Please, help to me

Best regards, Maxim
 
it is right for CR8.
but for CR9?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top