Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
778 views
in Technique[技术] by (71.8m points)

reporting services - SSRS 2008 R2 Globals!RenderFormat export methods

There are 7 built in options for exporting SSRS 2008 reports.

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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 is available during specific parts of the report processing/rendering cycle.

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 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...