Crystal Reports : Access denied
Hi,
I have a Crystal Report that dynamically loads a report and passes on parameters. On our local network it works fine one different servers.
Now I've installed it on a clients server, and it doesn't work anymore.
This is the code I use:
VB Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
If Request.QueryString.Count > 1 Then
'Declareren variabelen
Dim i As Integer
Dim pfFields As ParameterFields = New ParameterFields()
'toevoegen parameters
For i = 1 To Request.QueryString.Count - 1
AddParameter("@" & (Request.QueryString.Keys(i).ToUpper), Request.QueryString(i), pfFields)
Next
crvCrystalReport.ParameterFieldInfo = pfFields
CrystalReportSource.ReportDocument.Load("C:\Inetpub\wwwroot\rapport\" & Request.QueryString(0))
CrystalReportSource.ReportDocument.SetDatabaseLogon("sa", "password", "SERVER", "Database")
crvCrystalReport.ReportSource = CrystalReportSource
End If
Catch ex As Exception
Response.Write(ex.Message)
Response.Write(ex.InnerException.ToString())
End Try
End Sub
AddParameter is a function that adds the paramater to the collection.
This works fine on our own servers.
Now I've placed it at the clients server, changed the login data, and now I get these errors:
Code:
Load report failed.System.Runtime.InteropServices.COMException (0x80004005): Access is denied. at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
Anyone know how to fix this?
Re: Crystal Reports : Access denied
I'm not sure if this is the issue or not, but it could have to do with the version of Crystal you are using or the number of licenses you have for it.