【问题标题】:Render SSRS Reports in .docx instead of .doc在 .docx 而不是 .doc 中呈现 SSRS 报告
【发布时间】:2017-06-16 07:50:18
【问题描述】:

我使用 SQL Server R2 报表服务来设计报表,然后使用 Report Viewer 11 集成到 ASP.Net 中。当用户以 Word 格式导出报表时,报表的扩展名为 .doc,这使得报表的大小非常高的。有没有我们可以将格式更改为 .docx 以减小文件大小。

【问题讨论】:

    标签: c# asp.net reporting-services ssrs-2008 ssrs-2008-r2


    【解决方案1】:

    这可以使用 Word Renderer 来实现。

    在 SQL Server Reporting Services 中,默认的 Word 呈现器是 呈现为 Microsoft Word 格式 (.docx) 的版本。这是 Reporting Services Web 门户中的“导出”菜单的 Word 选项 和 SharePoint 列表。

    WORDOPENXML - 软分页符 - 在导出菜单中显示为“Word” 查看报告时。 Word 呈现扩展插件将报表呈现为 与 Microsoft Word 2013 兼容的 Word 文档 (.docx)。 有关详细信息,请参阅导出到 Microsoft Word。

    <Extension Name="WORD" Type="Microsoft.ReportingServices.Rendering.WordRenderer.WordDocumentRenderer,Microsoft.ReportingServices.WordRendering" Visible="false"/>
    
    <Extension Name="WORDOPENXML" Type="Microsoft.ReportingServices.Rendering.WordRenderer.WordOpenXmlRenderer.WordOpenXmlDocumentRenderer,Microsoft.ReportingServices.WordRendering"/>
    

    参考this链接。

    【讨论】:

    • 这也适用于报告的直接链接 - 当使用 &rs:Format=WORDOPENXML 作为报告 URL 的一部分时
    猜你喜欢
    • 1970-01-01
    • 2013-06-24
    • 2013-06-06
    • 2014-06-12
    • 1970-01-01
    • 1970-01-01
    • 2019-06-24
    • 1970-01-01
    • 2023-03-18
    相关资源
    最近更新 更多