Crystal 一段时间后报告未显示数据

Crystal Report is not showing data after some time

我已经完成了以下 questions.please 不要将我的问题标记为重复。 我遇到这个问题是因为上一份 month.My crystal 报告在良好的开发环境中工作(windows-7 32 位,VS2010,Crystal 报告 V.13)。我部署在服务器上 (windows server-2012 64bit,core i5)。问题是一段时间后报告得到 blank.I 搜索了很多关于它并使用 Dispose(),Close() 方法,现在我正在使用下面的代码。

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)
        {
            Directory.CreateDirectory(strFolderName);
        }

        //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
        RptReport.Export();
        //Stream it to the Client
        objResponse.ClearContent();
        objResponse.ClearHeaders();
        strReportOutputName = "Report";
        objResponse.ContentType = "application/pdf";
        objResponse.AddHeader("Content-Disposition", "inline;filename=Report.pdf");
        objResponse.WriteFile(strFilename);
        objResponse.Flush();
        objResponse.Close();
        //Delete the File   
        System.IO.File.Delete(strFilename);
        //Close the Report Object
        RptReport.Close();
        RptReport.Dispose();
        GC.Collect();
    }

   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: 

键码程序集 BusinessObjects.Licensing.KeycodeDecoder.dll 无法加载。 任何帮助将不胜感激。感谢提前。

将您的 asp.net 文件夹复制到服务器虚拟目录...

不确定,但希望您的问题能够解决。祝你好运。

您的方法是正确使用 .close 和 .处理但最好的使用方法是:

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

要打开 crystal PDF 报告,您可以使用 http 响应,这样性能会更好:

    cryRpt = New ReportDocument
    cryRpt.Load(Server.MapPath("Your report path"))
    cryRpt.SetDataSource(Your data source)
   cryRpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "ExportedReport")

问题看起来与服务器上的 Crystal 报告安装有关...如果它在开发机器上工作正常并且 运行 [=] 所需的所有应用程序16=] 报告已安装在部署服务器上,然后请检查.. IIS 中的应用程序池 --> select 用于 Web 应用程序的应用程序池 --> 高级设置-> 启用 32-应用程序 -- > 将其设置为 "True" ..

请尝试检查...

经过长时间的研究,我的问题已经通过在 registry.Actually 中进行以下更改得到解决这个问题与打印作业限制有关,默认情况下为 75 我只是根据我的要求扩展它的数据大小,它适用于我.

转到-->运行----->注册 1-HKEY_LOCAL_MACHINE 2-软件 3-SAP 业务对象 4-CRYSTAL .NET FRAMEWORK 报告(您的版本号) 5-报表应用服务器 6 台服务器

然后到达 "PrintJobLimit" 属性 并将其数据大小更改为您想要的任何大小。 感谢每一位帮助我的人