Home > DeveloperSection > Forums > Crystal Report is not showing data after some time
ben reitman
ben reitman

Total Post:96

Posted on    March-31-2015 5:50 AM

 Crystal Report C#  Crystal Report 

 1 Reply(s)
 1263  View(s)
Rate this:

Crystal Report is not showing data after some time in CR version 13.0.2000.0 I am facing this issue since last 1 month. My crystal report are working fine development environment (windows-7 32bit, VS2010, Crystal report V.13). I deployed on server (windows server-2012 64bit, core i5). Problem is that after some time report getting blank. I search a lot about that and use Dispose (), Close () method, right now I’m using the following code.


public static void OpenPdfInBrowser(ReportClass RptReport)


        string strFilename;

        string strFolderName;

        string strFile = String.Empty;

        string strReportOutputName = String.Empty;


        HttpResponse objResponse = HttpContext.Current.Response;

        HttpSessionState objSession = HttpContext.Current.Session;

        HttpServerUtility objServer = HttpContext.Current.Server;


        strFolderName = objServer.MapPath("../ReportOutput");

        if (Directory.Exists(strFolderName) == false)





        //Generate the File Name

        strFilename = "";

        strFile = objSession.SessionID.ToString() + "_" + DateTime.Now.Ticks.ToString() + ".pdf";

        strFilename = strFolderName + "\\" + strFile;


        //Set the File Name

        DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();

        diskOpts.DiskFileName = strFilename;


        //Set the Various Options

        ExportOptions exportOpts = new ExportOptions();

        exportOpts = RptReport.ExportOptions;

        exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;

        exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat;

        exportOpts.DestinationOptions = diskOpts;

        //Export the Report


        //Stream it to the Client



        strReportOutputName = "Report";

        objResponse.ContentType = "application/pdf";

        objResponse.AddHeader("Content-Disposition", "inline;filename=Report.pdf");




        //Delete the File  


        //Close the Report Object






   I am getting the following error in event viewer on deployment server.

The description for Event ID 4353 from source Crystal Reports cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    If the event originated on another computer, the display information had to be saved with the event.

    The following information was included with the event:

The key code assembly, BusinessObjects.Licensing.KeycodeDecoder.dll, cannot be loaded. Any help will be greatly appreciated. Thanks in advance.

ezra heywood
ezra heywood

Total Post:145

Posted on    March-31-2015 7:04 AM

Your approach is correct to use .close and . dispose but the best way to use it is :

 Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload



End Sub

to open crystal report in PDF you can use http response it will be better in performance :


    cryRpt = New ReportDocument

    cryRpt.Load(Server.MapPath("Your report path"))

    cryRpt.SetDataSource(Your data source)

   cryRpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "ExportedReport")

shareimprove this answer

Don't want to miss updates? Please click the below button!

Follow MindStick