User-1680333004 posted
hi all i have a crystal report wirh wo datasource (oracle and sql2005)
how i can pass login info to these datasource using asp.net code (vb.net)
at the same time
i can only pass for one datasource what about the second one
Private Sub configureCRYSTALREPORT1()
Dim myConnectionInfo As New ConnectionInfo()
myConnectionInfo.ServerName = "Sname"
myConnectionInfo.DatabaseName = "MyDB"
myConnectionInfo.UserID = "user"
myConnectionInfo.Password = "PW"
setDBLOGONforREPORT(myConnectionInfo)
End Sub
Private Sub setDBLOGONforREPORT(ByVal myconnectioninfo As ConnectionInfo)
Dim mytableloginfos As New TableLogOnInfos()
mytableloginfos = reportviewer1.LogOnInfo
For Each myTableLogOnInfo As TableLogOnInfo In mytableloginfos
myTableLogOnInfo.ConnectionInfo = myconnectioninfo
Next
mytableloginfos.MergeByConnection(mytableloginfos)
End Sub
in the page_load i call
configureCRYSTALREPORT1()