在windows Server 2012 R2上运行RDLC报表.他们死在共产党的深处
本文关键字:他们 共产党 深处 报表 运行 Server windows 2012 R2 RDLC | 更新日期: 2023-09-27 18:16:23
我有一个winforms应用程序,在VS2013
它运行RDLC报告和Razor View报告(从我们的web应用程序中提取)
在我的w7上,两种类型的报告都可以工作…
在server 2012 R2的RDLC报告失败,在CLR的深处,并给出以下错误:(但Razor views -> pdf通过Rotativa工作良好)
Problem signature:
Problem Event Name: APPCRASH
Application Name: EFRG3G.exe
Application Version: 3.1.16.0
Application Timestamp: 53dc0cb7
Fault Module Name: clr.dll
Fault Module Version: 4.0.30319.34014
Fault Module Timestamp: 52e0b86c
Exception Code: c0000005
Exception Offset: 0000000000003150
OS Version: 6.3.9600.2.0.0.400.8
Locale ID: 1033
Additional Information 1: 372e
Additional Information 2: 372ebc0e88d0905b1dfc62799213ffc9
附加信息3:0f90附加信息4:0f90fe4c558cb8bf2158eb0f66bc20e2
如果我在远程调试器中运行它,我会得到更多的信息:
Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in '''jcdc-d-web-003'd$'WinForm'EFRG3G'EFRG3G.exe'.
Additional information: The runtime has encountered a fatal error. The address of the error was at 0x95ab3150, on thread 0x42fc. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
当我尝试像这样呈现RLDC报告时,它就会发生:
LocalReport localViewer =
new LocalReport
{
EnableExternalImages = true,
ReportEmbeddedResource =
"EFRG3G.Reporting.RDLC." + reportRenderParameters.ReportFileName
};
localViewer.DataSources.Add(reportRenderParameters.ReportDataSource);
// add parameters that rdlc needs
if (reportRenderParameters.ReportParameters.Count != 0)
localViewer.SetParameters(reportRenderParameters.ReportParameters);
// setup subreports
if (reportRenderParameters.SubReportsDataSources.Count != 0)
{
foreach (ReportDataSource reportDataSource in reportRenderParameters.SubReportsDataSources)
{
localViewer.DataSources.Add(reportDataSource);
}
localViewer.SubreportProcessing += SetSubReportDataSource;
}
Byte[] byteArray = null;
byteArray = localViewer.Render( // it blows up right here!!!
reportRenderParameters.ReportType.ToString( "g" ), "",
out mimeType,
out encoding,
out fileExtension,
out streamids,
out warnings );
相同的代码在vs2008, vs2010
我认为这是一个丢失的报告预要求,没有安装在2102服务器上,所以我安装了这个:
微软。ReportViewer 2012
需要安装这个:
Microsoft®System CLR Types for Microsoft®SQL Server®2012
但是它仍然不能工作…
让vs2013编译的rdlc在Server 2012 R2上查看还需要什么?
如果不是缺少先决条件,还有什么可能只在Svr 2012 R2上导致此错误?
算出来了,原来我不需要上面的安装程序(2012年,2008年)…
我所需要的是2010年的报告查看器发行包。我在vs2010中构建了报告,所以这是有意义的。
在这里获取2010报表查看器发行版包
您可以安装多个版本的发行版,但我删除了上面的两个版本,因为查看器是2012,而clr类型是2008…
是的,我试图删除2008 clr类型并安装2012 clr类型,这不起作用…
如果有人需要,这里是2012 CLR类型(x86或x64)你进入下载,选择你想要的特定包在这里获取2012 clr类型
和
在这里获取2012 ReportViewer发行版