SSRS 2008 R2 Globals!RenderFormat export methods

后端 未结 3 1744
星月不相逢
星月不相逢 2021-01-14 13:28

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:

3条回答
  •  鱼传尺愫
    2021-01-14 13:49

    Use "RPL" for a simpler IIF expression so that any other format is "EXCEL", "CSV", "WORD", etc. When the report is displayed in the report server viewer or a ReportViewer control the RenderFormat is "RPL".

        =IIF(Globals!RenderFormat.Name = "RPL", true, false)
    

    The above code when set as a visibility expression will show the field when rendered in SSRS and hide it on export.

    Tip: When you have a long IIF expression use a switch expression Reporting Services Expression Examples they are by far cleaner and easier to manage.

提交回复
热议问题