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.

There is a native way to hide data elements sent to CSV by using DataElementOutput=NoOutput

  1. Open the properties menu (<kbd>F4</kbd>) for the TextBox

  2. Set the DataElementOutput property to NoOutput

    screenshot

Further Explanation

When SSRS has to render a chart, it has a couple of decisions to make. If you spent a lot of time doing some cool formatting, it will try to preserve that when going to PDF because PDF documents are full of rich formatting. For example, if you set the margins of the report, a PDF should care, but a CSV has no way to even hold that information (nor should it).

As such, there are different rendering engines used by SSRS:

Render Engines

Each of these has their own process. The data exports, for example, will only pull information from datafields. For example, a data field is welcome to have several layers of headers, the names of which may or may not use CLS-compliant identifiers, so it's safer to extract that information directly from the textbox name itself.

The TextBox containing the data can be used to set other data export properties as well.

In this instance, you can remove a particular data field by using the DataElementOutput which:

Indicates whether the data point should appear in a data rendering.

Further Reading