I am using crystal report in my web site But when Try any Report . Your Request Caused Some Errors, Please Contact System Administrator for help! Error Number: New Error Discription: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException RRS feed

  • Question

  • User730593547 posted

    Imports CrystalDecisions.Shared
    Imports System.Data
    Imports System.Data.SqlClient
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.ReportSource
    Public Class XMLReport2PDF
    Inherits System.Web.UI.Page

    #Region " Web Form Designer Generated Code "

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

    End Sub

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

    #End Region
    Dim oTools As ProjectTools
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    oTools = New ProjectTools(Request, Application, Response, Session)
    Catch exp As Exception
    oTools.oErrorHandler.AddNewError("Unhandled", "System", "Login.aspx.vb", "dip/Login.aspx", "page_load", exp.ToString, exp.ToString)
    oTools.oInterfaceMan.GenerateHTML(, "ErrorPage")
    oTools = Nothing
    End Try
    End Sub
    Private Sub ShowPDF(ByVal intReportNum As String)
    Dim exportOpts As New ExportOptions()
    Dim oRpt As New ReportDocument()

    Dim diskOpts As New DiskFileDestinationOptions()

    If oTools.oXMLReportsHandler.GrantReportAccess(intReportNum) Then
    oRpt.Load(Request.PhysicalApplicationPath & oTools.oXMLReportsHandler.oReportsXML.selectSingleNode("//Report[@id = '" & intReportNum & "']/Path").text)

    oRpt.Database.Tables(0).Location = Request.PhysicalApplicationPath & oTools.oXMLReportsHandler.oReportsXML.selectSingleNode("//Report[@id = '" & intReportNum & "']/XMLFile").text
    exportOpts = oRpt.ExportOptions
    exportOpts.ExportDestinationType = ExportDestinationType.DiskFile
    exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat ' ExportFormatType.WordForWindows, ExportFormatType.Excel other formats
    'temp file name
    Dim strFileName As String = "Rep" & Year(Now) & Month(Now) & Day(Now) & Minute(Now) & Second(Now) & Int((99999 - 10000 + 1) * Rnd() + 10000) & ".pdf"
    diskOpts.DiskFileName = Request.PhysicalApplicationPath & "xmlreports\temp\" & strFileName
    exportOpts.DestinationOptions = diskOpts
    Response.Write("<meta http-equiv=""refresh"" content=""1;url=temp/" & strFileName & """> ")
    Response.Write("Preparing Your Report, Please Hold On..")
    Response.Write("No Access")
    End If
    End Sub

    End Class

    Wednesday, October 30, 2013 10:48 AM

All replies

  • User1815411410 posted

    hi jaseroos,

    Would you please kindly check further into the Windows Event Viewer file? I need to know the error message in detail

    Also, did you experience this issue when you upload your site to the server? Does it work locally?

    If you upload it to the server, you must ensure that the server has the same crystal report version installed + your site must operate on LOCAL SERVICE permission

    Hope this helps :) 

    Thursday, October 31, 2013 12:25 AM