VB Crystal Report >> ASPX: Logon Failed or Load report failed

by Ben » Tue, 03 May 2005 20:26:36 GMT

Hi

We have the below code that we are using to display a crystal report in an
ASPX page.

We have changed the setup to a push method using a dataset due to logon
failed problems that it seems many developers have seen.

The problem is that we seem to be fighting two problems:

1) If the web is setup to impersonate an administrator then we get a load
report failed on teh
Otherwise
2) If the web is setup to not impersonate then I recieve logon failed.

Any advice would be much appreciated.

Thanks
B



Dim report As Time_1Day_1FE = New Time_1Day_1FE
Dim parameterFields As ParameterFields
Dim parameterValues As ParameterValues

CrystalReportViewer1.Visible = True

CrystalReportViewer1.ReportSource = report

'Get the Parameters collection from the Viewer
parameterFields = CrystalReportViewer1.ParameterFieldInfo

'Get Date parameter
Dim dteDateFld As ParameterField = parameterFields.Item("Date")
parameterValues = dteDateFld.CurrentValues
Dim dteDate As ParameterDiscreteValue = New ParameterDiscreteValue
dteDate.Value = Now
dteDateFld.CurrentValues.Add(dteDate)
parameterValues.Add(dteDate)

'Get Manager
Dim fldManager As ParameterField =
parameterFields.Item("ManagerRef")
parameterValues = fldManager.CurrentValues
Dim strManagerRef As ParameterDiscreteValue = New
ParameterDiscreteValue
strManagerRef.Value = ""
fldManager.CurrentValues.Add(strManagerRef)
parameterValues.Add(strManagerRef)

CrystalReportViewer1.ParameterFieldInfo = parameterFields




Similar Threads

1. fail in changing DB logon information when loading non-typed Crystal Report file - VB Crystal Report

2. Logon Error when using PrintReport Error Printing Report : Logon Failed"

When I use the following code to direct print a report I get an "Error
Printing Report : Logon Failed" message.

Dim SupplyRpt As New SupplyOrdersRpt
SupplyRpt.SetParameterValue("StoreNumber", gStore)
SupplyRpt.SetDataSource(reportDS.Tables(0).DataSet)
SupplyRpt.Load()
SupplyRpt.PrintToPrinter(1, True, 0, 0)

I don't undestand why.  I have used this code before and it works fine. If I
load the report into my viewer it works just fine and I can print it from
there.. Hmm

Stacey


3. Logon Failed onppenig a report with crystal reports XI - VB Crystal Report

4. Load Report Failed Crystal Reports 9 on Windows 2003 Standard Edition SP1 on VMware

Could any one please help!!!
We are testing VS2003 app with Crystal Report 9, it runs fine on Window
2000 server, but we are getting the error below when we run the same
app on Windows 2003 Standard Edition SP1
(the server is installed on VMware).

Load report failed.

CrystalReportViewer -crXXXData
Use the ReportSource of DataBindings property to specify a report
source.

Would appreciate any help!!

Thanks,
CC

5. Crystal Reports - Load Report failed. "Invalid Table Number" - VB Crystal Report

6. Crystal Report After Export Load report failed

Dear all,

I encounter a problem with Crystal Report from Visual Studio which is 
"CrystalDecisions.Windows.Forms.CrystalReportViewer". 

The problem is, whenever I export a report to PDF,Excel and etc. it export 
successfully, but when I click on the other report to try to view the report 
it prompt "Load Report Failed". 

This error only occurs after exported a report.

Please help. Thanks in advance.

Cheers,
Mae

7. Logon Failed with Crystal Reports and VB.NET - Microsoft .NET Framework

8. Crystal Reports and Logon Failed.

Hi All

Am having major problem with crystal reports...Have 
designed my report no problem, its when I try to run and 
display ther report that I am getting a "Login Failed" 
message.  At first I thought it might have to do with the 
regristration key, but that ok,  when I right click on 
Servers in the server explorer and then expand the 
Crystal Server, there is a red x beside the Crystal 
Enterprise.  When I click on log in, I am asked for a 
username and a password.  I don't know what to put into 
these fields, can anyone suggest a solution.

Michael