I’m using SSRS 2012 trying to do the following:
Some columns should only be visible on user request, using a combo box. Visibility of the columns dependes on the selected columns on the combo. This seems to work fine!
When I export the output in any format different of .csv these columns remain invisible. But when exporting to .csv invisible coulmns are shown.
I found this:
=iif(Globals!RenderFormat.Name="CSV", True, False)
This should be placed in the “Hidden” property of the column I’m trying to hide. But it doesn’t work and when I write the expression RenderFormat is not an option as auto-complete.
Sorry for my clumsy english and thanks.
CSV (and XML) export from SSRS is treated very differently than most export formats. These two are considered data renderers, not page renderers, and are generally written to get at the data underlying the report, disregarding layout options. Part of this is that field visibility isn’t handled the same way. I don’t know if it’s a bug or intentional design, but .CSV apparently doesn’t honor visibility set in expressions. One suggested work around is to conditionally set the value to
nullin the underlying dataset. (This could be based on a parameter.)