By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,949 Members | 1,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,949 IT Pros & Developers. It's quick & easy.

Crystal Reports "Load Failed" from web form Grrrrr

P: n/a
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.
crReportDocument.Database.Tables(0).SetDataSource( DS)
CrystalReportViewer1.ReportSource =
crReportDocument

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.

Thanks,

Jeff

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
This is the message I found on other forum:

--------------------------------
Hello.

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...

Erik
--------------------------------

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

also check here:

http://groups.yahoo.com/group/Crysta...et/message/680

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 20 '05 #2

P: n/a
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
InitializeComponent()

End Sub
Protected WithEvents MyDataGrid As
System.Web.UI.WebControls.DataGrid
Protected WithEvents CrystalReportViewer1 As
CrystalDecisions.Web.CrystalReportViewer

'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
Designer
'Do not modify it using the code editor.
InitializeComponent()

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")
crReportDocument.Database.Tables(0).SetDataSource( DS)
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

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.