I'm trying to read a querystring parameter to set my report database location.
I thought the following would work, but if I look in the properties of the report, the database/catalog is set there, and it looks like the code behind below won't create the connection @ runtime. If I try it agains a different database other that what's in the "Properties" when I click on Database/Database Expert and look at the SQL command, I'm prompted with the basic database, username, password page asking for the conneciton properties to what's in "Properties".
Basically, how do I get away from what's in the "Properties" section when I initally create the report?
My codebehind is as follows:
Dim strDB As String = UCase(Request.QueryString("DB"))
crv.ReportSource = "C:\CrystalReports\LCI.rpt"
Dim Counter As Integer
For Counter = 1 To crv.LogOnInfo.Count
With crv.LogOnInfo(Counter - 1).ConnectionInfo
.ServerName = "servername"
.DatabaseName = strDB
.UserID = "UID"
.Password = "pwd"
End With
Next
I thought the following would work, but if I look in the properties of the report, the database/catalog is set there, and it looks like the code behind below won't create the connection @ runtime. If I try it agains a different database other that what's in the "Properties" when I click on Database/Database Expert and look at the SQL command, I'm prompted with the basic database, username, password page asking for the conneciton properties to what's in "Properties".
Basically, how do I get away from what's in the "Properties" section when I initally create the report?
My codebehind is as follows:
Dim strDB As String = UCase(Request.QueryString("DB"))
crv.ReportSource = "C:\CrystalReports\LCI.rpt"
Dim Counter As Integer
For Counter = 1 To crv.LogOnInfo.Count
With crv.LogOnInfo(Counter - 1).ConnectionInfo
.ServerName = "servername"
.DatabaseName = strDB
.UserID = "UID"
.Password = "pwd"
End With
Next