2017-06-16 42 views
1

我使用SQL Server R2報告服務來設計報告,然後使用報告查看器11在ASP.Net中進行集成。當用戶以Word格式導出報告時,報告的擴展爲.doc這使報告的大小非常高。有沒有我們可以將格式更改爲.docx,以便減小文件的大小。使用.docx呈現SSRS報告而不是.doc

回答

1

這可以使用Word Renderer來實現。

在SQL Server Reporting Services中,默認Word呈現器是呈現爲Microsoft Word格式(.docx)的 版本。這是 Word選項,即在Reporting Services門戶網站 和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鏈接。

+0

此代碼需要添加到RsReportServer.config? –

+0

你提到了一個鏈接? –

+0

是的,我明白了。對不起,我最初錯過了那個部分 –