0

I have one textbox in SSRS report which I need to hide on export. I added expression for Hidden property to =IIF(Globals!RenderFormat.Name <> "RPL", True, False). but it always hiding textbox in ReportViewer as well as any type of export file.
Currently I have temporary fixed using = IIF(Globals!RenderFormat.IsInteractive OrElse Globals!RenderFormat.Name = "MHTML", False, True)
but wondering Why the first expression not working? and what is the solution for it?

Edit: Globals!RenderFormat.IsInteractive working. Globals!RenderFormat.Name = "MHTML" is not working so main statement stricked out in original post.

par
  • 1,061
  • 1
  • 11
  • 29

1 Answers1

2

While it is not explicitely detailed in the documentation. Globals!RenderFormat.Name is only accessible during different parts of the processing and rendering cycle.

On the other hand Globals!RenderFormat.IsInteractive is populated before the render request, hence before the Hidden property expression of your textbox is evaluated.

Check these links:

REFERENCE 1
REFERENCE 2

Let me know if this helps.

Community
  • 1
  • 1
alejandro zuleta
  • 13,962
  • 3
  • 28
  • 48
  • What could be solution of it? I mean hiding the text box for any export. Globals!RenderFormat.IsInteractive returns true even for MHTML. – par Sep 07 '16 at 10:33
  • @par, If you want to hide the textbox in any case, what is the purpose of use Global variables? – alejandro zuleta Sep 07 '16 at 12:44
  • alejandro zuleta , I mean hiding the textbox in any type of export, in report viewer it should be visible. – par Sep 07 '16 at 13:28
  • @par, The only option you have is use `Globals!RenderFormat.IsInteractive` but MHTML is interactive. Also a hard way could be customize programmatically Report Viewer export options. – alejandro zuleta Sep 07 '16 at 13:41