For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Crystal Reports > May 2005 > login information required?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author login information required?
George Hardy IV

2005-05-31, 9:00 pm

Hello,
I am having trouble with one particular report in my application. No other
report I distribute with my application has this problem, but this report
(that has 6 subreports) fails to load on one or two machines, and asks for
login information. I thought I was setting the login info correctly for the
reports before I launch them:

For Each crSection In crSections
crReportObjects = crSection.ReportObjects
For Each crReportObject In crReportObjects
If crReportObject.Kind = ReportObjectKind.SubreportObject Then
crSubreportObject = CType(crReportObject, SubreportObject)
subRepDoc =
crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
crDatabase = subRepDoc.Database
crTables = crDatabase.Tables
For Each crTable In crTables
With crConnInfo
.ServerName = sServer
.DatabaseName = sDatabase
.UserID = "username"
.Password = "password"
End With
crLogOnInfo = crTable.LogOnInfo
crLogOnInfo.ConnectionInfo = crConnInfo
crTable.ApplyLogOnInfo(crLogOnInfo)
Next
End If
Next
Next

But, for some reason, It still wants login info. I even tried hard-coding
the "sa" user and password, but no luck. The report is being fed by a typed
dataset.

Any help would be appreciated. Thanks.

George Hardy IV


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com