Load Report Failed

jeva39

Well-known member
Joined
Jan 28, 2005
Messages
135
Location
Panama
Programming Experience
1-3
I have two APP (Visual Basic 2005) in a Windows XP Pro machine and each APP have two Crystal Reports. In one of them all work OK but in the other I receive the error Load Report Failed in both reports.

Please, what I can do to solve this?

Thanks
 
What is the report source set to in your code ? As your program may be looking for a certain report on the c:\ drive and it is only on one of the machines c:\ drives and not the other.

If this is not the problem post your code and maybe we can see what else is going on. :)
 
This is the code: (vReporte is a variable defined in a Module)

VB.NET:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class Reporte
Private Sub CRView_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CRView.Load
  Try
   Dim document As ReportDocument
   document = New ReportDocument
   document.Load(Application.StartupPath & "\" & vReporte)
   CRView.ReportSource = document
   CRView.Refresh()
  Catch ex As Exception
   MessageBox.Show(ex.Message)
  End Try
End Sub
The stranger thing is that I use the same code in the application in which the reports run well. The another error you asked me don't apply to my case. The reports exists and are OK.

The code I use in the Menu Options are:



VB.NET:
 [LEFT]Private Sub mnuGeneral_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuGeneral.Click


vReporte = "MDGen.rpt"
[LEFT]Dim oRep As New Reporte
oRep.ShowDialog()
End Sub[/LEFT]

[/LEFT]




Thanks for your help...
 
Back
Top