IIS 7上的Crystal Reports for .NET Framework 4.0的PDF报告 [英] PDF report with Crystal Reports for .NET Framework 4.0 on IIS 7
问题描述
Hi,
在我的ASP.Net.MVC3应用程序中我使用Crystal Reports for .NET Framework 4.0作为报表引擎,并使用以下代码创建PDF报表:
In my ASP.Net.MVC3 application i use a Crystal Reports for .NET Framework 4.0 as report engine, and create a PDF report with following code:
; public ActionResult PrintPDF(int id)
public ActionResult PrintPDF(int id)
  {
{
       var res = db.procReturnData(id).ToList();
var res = db.procReturnData(id).ToList();
     ReportClass rptH = new ReportClass();
ReportClass rptH = new ReportClass();
  ;          rptH.FileName = Server.MapPath(@" /MyReprt.rpt");
rptH.FileName = Server.MapPath(@"/MyReprt.rpt");
  ;               rptH.SetDataSource(res);
rptH.SetDataSource(res);
          Stream = rptH.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Stream = rptH.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
              return file(stream," application / pdf");
return File(stream, "application/pdf");
      }
}
在我的本地系统上所有内容 工作正常,但是当我在IIS 7上部署时,我收到了一个错误。在IIS服务器上,我安装了适用于.NET Framework 4(32位)的SAP Crystal Reports运行时引擎。
On my local system everything work fine, but when I deployed on IIS 7 , I got a error. On IIS server I have a installed SAP Crystal Reports runtime engine for .NET Framework 4 (32-bit).
请任何帮助,可能导致此错误的原因
Please any help, what may causes this error
Mb
推荐答案
由于这是基类和相关问题的论坛,这可能是您可以采取的最错误的论坛。
As this is the forum for the base class and related questions is this probably the most wrong forum you could take.
但Microsoft不支持Crystal报告。
But Crystal report is not supported by Microsoft.
http://support.microsoft .com / kb / 317789 / zh-CN
试试这个论坛而不是那个
http://forums.sdn.sap.com/forum.jspa?forumID=313
感谢Mark
这篇关于IIS 7上的Crystal Reports for .NET Framework 4.0的PDF报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!