Click here to Skip to main content
15,896,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
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


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?
Posted

1 solution

Have you tried doing the same thing to the second crystal report?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900