Crystal Reports "Load Failed" from web form Grrrrr



Hi there. I'm a bit of a newbie, and I would appreciate any help that
anyone can give me on an error I'm getting with Crystal Reports.

Every time I attempt to view a report using the Crystal Report Viewer,
I get a "Load Report Failed" error, and I'm not sure what I can do to
resolve it.

I know it's not the connection to the data -- I'm able to get a
datagrid to display the data just fine after filling a dataset. I
tried searching the Crystal Decisions support site, and all of their
"load failed" info has to do with DLLs not being in the right place,
or permissions on the actual .RPT file, but all of that seems to be
in order.

These are the lines of code that keep kicking on me.

CrystalReportViewer1.ReportSource =

DS and crReportDocument are Dim-ed earlier like this:

[i:8f42c70c71] Dim crReportDocument As New CrystalReport1
Dim DS As DataSet[/i:8f42c70c71]

Any help would be greatly appreciated.





Martin Ho

This is the message I found on other forum:


I think I have the same problem, and am pretty sure I have it narrowed
down. While the CrystalReportViewer object has the correct login
information set, the ReportDocument object does not have the password
set. For some reason it never gets set even if I explicitly set it.

I'm ready to call Crystal Decisions on this one...


Looks like it's not only you having this problem.

also check here:




Thanks for the quick reply. Actually I'm not having logon issues. Mine
seems to be failing to load the report document itself. As I said,
logon to the database seems to work, since I can absolutely get the
very same dataset to populate a datagrid.

Here's the code on the page, in case anyone can see where I'm going
wrong. (I've XXXXX'd out the server and initial catalog names in the
connection string.)

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.ReportSource
Imports System.Data
Imports System.Data.OleDb

Public Class WebForm1
Inherits System.Web.UI.Page
Dim crReportDocument As New CrystalReport1
Dim DS As DataSet
Dim MyConnection As OleDbConnection
Dim MyCommand As OleDbDataAdapter

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub

End Sub
Protected WithEvents MyDataGrid As
Protected WithEvents CrystalReportViewer1 As

'NOTE: The following placeholder declaration is required by the
Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form
'Do not modify it using the code editor.

MyConnection = New
OleDbConnection("Provider=SQLOLEDB;workstation id='XXXXX';packet
size=4096;Trusted_Connection=Yes;data source=(local);persist security
info=False;initial catalog=XXXXX")
MyCommand = New OleDbDataAdapter("select * FROM
vw_RPT_Fiscal", MyConnection)

DS = New DataSet
crReportDocument = New CrystalReport1
MyCommand.Fill(DS, "vw_RPT_Fiscal")

CrystalReportViewer1.ReportSource = crReportDocument

End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

End Sub

End Class

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question