如何在不询问用户名和密码sql server的情况下加载多个Crystal报表 [英] how to load more than one crystal report without asking username and password sql server

查看:76
本文介绍了如何在不询问用户名和密码sql server的情况下加载多个Crystal报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Private Sub configureCRYSTALREPORT()
Dim myConnectionInfo As New ConnectionInfo()
myConnectionInfo.DatabaseName = "DatabserName"

myConnectionInfo.UserID = "UID"

myConnectionInfo.Password = "PWD"

setDBLOGONforREPORT(myConnectionInfo)

End Sub
Private Sub setDBLOGONforREPORT(ByVal myconnectioninfo As ConnectionInfo)

Dim mytableloginfos As New TableLogOnInfos()

mytableloginfos = CrystalReportViewer1.LogOnInfo

For Each myTableLogOnInfo As TableLogOnInfo In mytableloginfos

myTableLogOnInfo.ConnectionInfo = myconnectioninfo

Next

End Sub



我正在使用此代码,但它仅在第一个Crystal报告中起作用,而第二个Crystal报告在加载时仍然询问用户名和密码.如何解决此问题?



Im using this code but it work only the first crystal report another second crystal report when it load it still asking username and password..how to solve this problem?

推荐答案

您是否尝试过对第二个水晶报表执行相同的操作?
Have you tried doing the same thing to the second crystal report?


这篇关于如何在不询问用户名和密码sql server的情况下加载多个Crystal报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆