问题描述
有 7 个内置选项可用于导出 SSRS 2008 报告.
There are 7 built in options for exporting SSRS 2008 reports.
我想知道在选择导出选项时是否有更简单的方法在 SSRS 中编写以下代码:
I was wondering if there is an easier way to code the following in SSRS when chosing the export option:
=IIF(Globals!RenderFormat.Name="WORD" OR Globals!RenderFormat.Name="XML" OR
Globals!RenderFormat.Name="CSV" OR Globals!RenderFormat.Name="TIFF" OR
Globals!RenderFormat.Name="PDF", Globals!RenderFormat.Name="MHTML" OR
Globals!RenderFormat.Name="EXCEL",true,false)
有没有办法编写上面的代码而不必列出列出的每个导出选项?一种包含所有导出选项的方式?如果是这样,您将如何编写该代码?
Is there a way to write the code above without having to list each export option listed? A way that includes all the export options? If so, how would you write that code?
推荐答案
由于处理和呈现表达式和其他报表项的顺序,ShellNinja 的建议不能用作可见性表达式.
The suggestion from ShellNinja won't work as a visibility expression because of the order in which expressions and other report items are processed and rendered.
关于 TechNet 提示的文章内置全局变量和用户参考在 RenderFormat 副标题下(尽管是一个非常模糊的提示),它说:
The article Built-in Globals and Users References on TechNet hints at this (allbeit a very vague hint) under the RenderFormat subheading where it says that:
Globals!RenderFormat.Name
在报表处理/渲染周期的特定部分可用.
Globals!RenderFormat.Name
在计算表达式之前不会填充,而是在当前渲染请求完成时填充,这就是为什么它不能用于可见性表达式但会显示文本框中的名称.
Globals!RenderFormat.Name
is not populated prior to expressions being evaluated, it's populated on completion of the current render request which is why it can't be used in a visibility expression but will display the name in a textbox.
Globals!RenderFormat.IsInteractive
在表达式计算之前填充,并且是在呈现报表之前隐藏/显示报表项的唯一方法.RPL 和 HTML 被认为是完全交互的格式,所有其他格式都不支持或仅支持某些交互功能.可以在文章 Comparing 中找到有关这方面的更多信息TechNet 上不同报表呈现扩展的交互功能.
Globals!RenderFormat.IsInteractive
is populated prior to expression evaluation and is the only way of hiding/showing a report item prior to a report being rendered. RPL and HTML are considered fully interactive formats, all other formats are not or only support some interactive features. More information on this can be found in the article Comparing Interactive Functionality for Different Report Rendering Extensions on TechNet.
这篇关于SSRS 2008 R2 Globals!RenderFormat 导出方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!