2019-03-06
RDLC 支持的导出格式

RDLC 支持的导出格式有:Excel, EXCELOPENXML, IMAGE, PDF, WORD, WORDOPENXML

阅读此文

2017-12-22
阻止 RDLC 报表文件被 aspnet_compiler 预编译

在使用 aspnet_precompiler 对 ASP.NET WebForm 网站进行预编译时,如果网站内含有 RDLC 报表文件,它们也会被“预编译”而导致报表文件的内容被清空变成只有 1k 大小的 marker 文件。这会导致 Report Viewer 无法显示报表。怎样才能阻止 aspnet_compiler 编译 RDLC 文件呢?很简单,打开 web.config 文件,会发现如下设置:

1
2
3
4
5
6
7
<configuration>
<compilation debug="true">
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</buildProviders>
</compilation>
</configuration>

我们要做的就是去掉这个针对 .rdlc 的 build provider. 去掉之后再编译就会发现 RDLC 文件已经原封不动得复制到了输出目录。

阅读此文

2016-10-13
ASP.NET 输出的 PDF 数据流在 Microsoft Edge 浏览器里不显示的问题

公司的 .NET Framework 3.5 Web Form 的老项目遇到个问题,就是输出的 PDF 数据流在Microsoft Edge浏览器里不显示。但在其它浏览器里就没问题。 用Google大法找到了问题的答案:“Microsoft Edge PDF inline issue” Same Issue Again.

阅读此文