仍要求登录... [英] still asking for login ...
问题描述
我多次尝试过,通过这个论坛阅读,在显示水晶报告之前仍然无法摆脱登录页面。 我想知道是否有人可以给我一些提示?非常感谢 !!
受保护 Sub Page_Load( ByVal 发件人 As 对象 , ByVal e As System.EventArgs) 句柄 Me .Load
Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
myConnectionInfo.ServerName =
myConnectionInfo.DatabaseName =
" xxx"myConnectionInfo.UserID =
" xxx"myConnectionInfo.Password =
" xxx"
Me .CrystalReportViewer1.ReportSource = report
SetDBLogon4Report(myConnectionInfo)
结束 < font size = 2> Sub
私人 Sub SetDBLogon4Report( ByVal myConnectionInfo As ConnectionInfo )
Dim myTableLogOnInfos As TableLogOnInfos = CrystalReportViewer1.LogOnInfo
For 每个 myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos
myTableLogOnInfo.ConnectionInfo = myConnectionInfo
Next
结束 Sub
您缺少几行重要的代码,具体调用ApplyLogonInfo,请参考以下kbase:
http://support.businessobjects.com/library/kbase/articles/c2011464.asp
i tried many times, read through this forum, still cant get rid of the login page before display the crystal report. and i am wondering if anyone can give me some HINT ? thanks alot !!
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
myConnectionInfo.ServerName =
"xxx"myConnectionInfo.DatabaseName =
"xxx"myConnectionInfo.UserID =
"xxx"myConnectionInfo.Password =
"xxx"Me.CrystalReportViewer1.ReportSource = report
SetDBLogon4Report(myConnectionInfo)
End SubPrivate Sub SetDBLogon4Report(ByVal myConnectionInfo As ConnectionInfo) Dim myTableLogOnInfos As TableLogOnInfos = CrystalReportViewer1.LogOnInfo For Each myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos
myTableLogOnInfo.ConnectionInfo = myConnectionInfo
Next End SubYou're missing a couple important lines of code, specifically calling ApplyLogonInfo, refer to the following kbase:
http://support.businessobjects.com/library/kbase/articles/c2011464.asp
这篇关于仍要求登录...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!