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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subreport db login credentials

Status
Not open for further replies.

clanm

Programmer
Dec 26, 2005
237
US
I have a report which works fine if it's just the main report. When I add a subreport, the user is prompted for the db credentials when the page first loads, and when you "page" to another page.

Here's my VB code behind on the page load for the main report:
...two namespaces imported are
(
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
)


crvTest.ReportSource = "C:\CrystalReports\WI\subrptTest_110906.rpt"
Dim Counter As Integer
For Counter = 1 To crvTest.LogOnInfo.Count
With crvTest.LogOnInfo(Counter - 1).ConnectionInfo
.ServerName = "server"
.DatabaseName = "dbname"
.UserID = "uid"
.Password = "pwd"
End With
Next

I've tried a ton of examples, and can't get things to work. My last shot was:

..but I don't know if I have all the namespaces to work with this example. Intellesense won't let me complete:
crReportDocument = new ReportDocument(); crReportDocument.Load("c:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top