SSRS 2005 在报表而不是服务器上设置 SimplePageHeaders?

发布于 2024-09-05 15:12:24 字数 901 浏览 5 评论 0原文

我有一份报告无法从 SSRS 2005 导出到 excel。我知道我可以


<Render>
    <Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering">
        <Configuration>
            <DeviceInfo>
                <SimplePageHeaders>True</SimplePageHeaders>
            </DeviceInfo>
        </Configuration>
    </Extension>
</Render>

在 rsreportserver.config 中使用,但我并不是唯一在这台机器上拥有报告的人。我还发现你可以通过

&rc:SimplePageHeaders=True
in the url to export the report programatically.

我尝试在导航到报表管理器时将 &rc:SimplePageHeaders=True 添加到网址末尾,但是当我从下拉列表中选择 excel 并单击导出时,标题仍然会导出。我什至尝试在网址中设置 rc:Command=Render 和 rc:Format=EXCEL ,但没有任何运气。

有办法做我想做的事吗?

注意:我想在内置报告管理器上呈现报告,并使用导出到 Excel 下拉列表中的内置功能,而不是在应用程序或网站中。

I have one report that does not export to excel friendly from SSRS 2005. I know I can use


<Render>
    <Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering">
        <Configuration>
            <DeviceInfo>
                <SimplePageHeaders>True</SimplePageHeaders>
            </DeviceInfo>
        </Configuration>
    </Extension>
</Render>

in the rsreportserver.config, but I am not the only person with reports on this machine. I also found that you can pass

&rc:SimplePageHeaders=True

in the url to export the report programatically.

I tried adding the &rc:SimplePageHeaders=True to the end of the url when navigating to the report manager, but when I select excel from the dropdown and click export the headers are still exported. I even tried setting the rc:Command=Render and rc:Format=EXCEL in the url too without any luck.

Is there a way to do what I am trying to do?

note: I am wanting to render the report on the built in report manager and use the build in export to excel dropdown, not in an app or website.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苦行僧 2024-09-12 15:12:24

您要做的不是覆盖现有的 Excel 渲染器,而是提供另一个渲染器来去除标题并将其包含在导出菜单可用的渲染器列表中。您几乎已经有了解决方案 - 您不想修改当前的 Excel 渲染器,而是想提供另一个渲染器。这里有一些技巧:

  • 您必须为该渲染器指定一个与当前 Excel 渲染器不同的名称,当前 Excel 渲染器在我的系统上具有 Name="EXCEL",否则您将只能看到一个 Excel 渲染
  • 器渲染器的显示名称不会是您上面调用的名称,而只是 Excel,因为这是渲染器提供的显示名称,因此您将看到两个名为 Excel 的选项,并且您不会不知道哪一个是没有页眉的。
  • 因此,您必须覆盖该名称。
  • 当您覆盖该名称时,您必须指定要覆盖该名称的语言。您设置的语言值必须对报表服务器计算机有效。例如,如果报表服务器在法语操作系统上运行,则应指定 "fr-FR" 作为属性值。我使用 "en-AU" 因为我是澳大利亚人,如果您在美国,则应使用 "en-US"

因此,在 rsreportserver.config 的 部分中当前 EXCEL 渲染器(不要替换现有的渲染器)下,您可以插入如下内容

<Extension Name="EXCEL (No Header)" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering">
    <OverrideNames>
        <Name Language="en-AU">Excel (No Header)</Name>
    </OverrideNames>
    <Configuration> 
        <DeviceInfo>
            <SimplePageHeaders>True</SimplePageHeaders> 
        </DeviceInfo> 
    </Configuration> 
</Extension>

: Reporting Services 导出菜单上有两个 Excel 选项:ExcelExcel(无标题)

不要忘记更改 < 中的语言属性/code> 为报表服务器上的语言,或者两个选项都将简单地称为 Excel

Instead of overriding the existing Excel renderer, what you want to do is supply another renderer that strips out the headers and include this in the list of renderers available to the export menu. You almost have the solution - instead of modifying the current Excel renderer you want to supply another one. There are a couple of tricks here:

  • You must give this renderer a name that is different to the current Excel renderer which has Name="EXCEL" on my system, otherwise you will only see one Excel renderer
  • The displayed name of the renderer will not be the name you called it above, but will simply be Excel as that is the display name supplied by the renderer, so you will see two options called Excel and you won't know which is the one without page headers.
  • Consequently you must override the name
  • When you override the name, you must specify the language that you are overriding it for. The language value that you set must be valid for the report server computer. For example, if the report server is running on a French operating system, you should specify "fr-FR" as the attribute value. I'm using "en-AU" as I am Australian, you would use "en-US" if you are in USA.

Thus, under the current EXCEL renderer (don't replace the existing one) in <Render> section of rsreportserver.config, you would insert something like:

<Extension Name="EXCEL (No Header)" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering">
    <OverrideNames>
        <Name Language="en-AU">Excel (No Header)</Name>
    </OverrideNames>
    <Configuration> 
        <DeviceInfo>
            <SimplePageHeaders>True</SimplePageHeaders> 
        </DeviceInfo> 
    </Configuration> 
</Extension>

This will give you two Excel options on the Reporting Services export menu: Excel and Excel (No Header)

Don't forget to change the language attribute in <OverrideNames> to the language on your report server or both options will simply be called Excel

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文