Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User ID, Password Required for AS400 Connection

Status
Not open for further replies.

PaulaWright

Programmer
Apr 29, 2003
6
0
0
Version 8.5
Client Access ODBC Driver
System DSN

I see that something along these lines has been posted a couple of years back, but I don't see a definitive solution to the problem.

I have created several reports that do not require me to login with my user id and password as long as I already have a connection established somewhere with the AS400; however, when the users try to open these reports they are prompted for the user id and password with my user id as the default. They are set up with the appropriate DSN.

I see in Article ID c2005115 under BusinessObjects Support that it was once considered a problem to not be prompted for the user id and password so they "fixed" it. Now I'm trying to find a way to avoid it.

I can see when looking at the Set Location window within the report that my User Id is set - I assume through the Operations Navigator.

The Connection Options under the configuration for the System DSN are set to "Use default user id, prompt as needed" and the user id is blank. If I go to the Operations Navigator Connection Properties, it is set to the same, however a user id is required - it can't be left blank.

How can I fix it so that if a user is already signed on to the AS400 he/she does not have to sign on to access the report?

Thanks
 
For a web form try this:


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim reportPath As String = Server.MapPath("CrystalReport1.rpt")
Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()

myConnectionInfo.DatabaseName = "...."
myConnectionInfo.UserID = "...."
myConnectionInfo.Password = "...."

CrystalReportViewer1.ReportSource = reportPath
SetDBLogonForReport(myConnectionInfo)
End Sub

Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo)
Dim myTableLogOnInfos As TableLogOnInfos = CrystalReportViewer1.LogOnInfo
For Each myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos
myTableLogOnInfo.ConnectionInfo = myConnectionInfo
Next
End Sub


Lelo66
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top