我已经在实时服务器上部署了水晶报表。该报告在我的本地机器上正常工作。
当我通过实时服务器上传时,它要求我提供服务器登录详细信息,因此我按照以下方式编写代码
Dim I As Integer
Dim LogonInfo As String()
Dim Server As String = "", Database As String = "", User As String = "", Pwd As String = ""
LogonInfo = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString.Split(";")
For i = 0 To LogonInfo.Length - 1
Dim strTemp As String() = LogonInfo(i).Split("=")
Select Case strTemp(0).ToLower()
Case "server"
Server = strTemp(1)
Exit Select
Case "database"
Database = strTemp(1)
Exit Select
Case "user id"
User = strTemp(1)
Exit Select
Case "password"
Pwd = strTemp(1)
Exit Select
End Select
Next
CRViewer.ReportSource = rptName
Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
myConnectionInfo.DatabaseName = Database
myConnectionInfo.UserID = User
myConnectionInfo.Password = Pwd
myConnectionInfo.IntegratedSecurity = True
Dim myTableLogOnInfos As TableLogOnInfos = CRViewer.LogOnInfo()
For Each myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos
myTableLogOnInfo.ConnectionInfo = myConnectionInfo
Next
它仍然要求 credential 。这可能是什么解决方案?