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

Failed to load crystal report

Status
Not open for further replies.

Elsje

Programmer
Feb 20, 2004
44
BE
Hi,

I have made a report with a subreport when I want to display it I always get the message "Failed to load".
If I delete the subreport in my report it works fine.

I use Visual studio 2005 and crystal report 11 release 2.

This is a part of my code:

Dim mrptCrProc As New ReportDocument
mrptCrProc.Load(mstrReport)

For Each tbCurrent In mrptCrProc.Database.Tables
tliCurrent = tbCurrent.LogOnInfo

With tliCurrent.ConnectionInfo
.UserID = ""
.Password = ""
.ServerName = gstrServer
.DatabaseName = gstrDatabase
End With

tbCurrent.ApplyLogOnInfo(tliCurrent)
Next tbCurrent

'aply parameters
If gstrParameter(0).Value <> "" Then
For intCnt = 0 To UBound(gstrParameter)
crpdProc.Value = gstrParameter(intCnt).Value
crpColl.Add(crpdProc)
mrptCrProc.DataDefinition.ParameterFields(gstrParameter(intCnt).Name).ApplyCurrentValues(crpColl)
Next
End If

crViewer.ReportSource = mrptCrProc

Thanks in advance
Elsje
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top