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
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"
Session("SQLPassword"
Session("CRDSN"
Session("SQLDatabase"
Set mainReportTableCollection = Session("oRpt"
For Each mnTable in mainReportTableCollection
With mnTable.ConnectionProperties
.Item("user ID"
.Item("Password"
.Item("DSN"
.Item("Database"
End With
Next
3. All is ok
4. Call this report for other Database (use report.asp)
Session("SQLUserName"
Session("SQLPassword"
Session("CRDSN"
Session("SQLDatabase"
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