1
votes

In an SSRS 2008 r2, I am going to have some selected colunmns set as invisibile while the ssrs 2008 r2 report is running. However when the report is exported only to excel and csv files, I want those invisible columns to be included in the export. Thus can you tell me and or show me in code how to add the selected invisible columns to only the CSV and excel exports?

1

1 Answers

3
votes

If you right click on the column and select 'Column Visibility...' and select 'Show or hide based on an expression' and enter the following code:

=IIF(Globals!RenderFormat.Name = "EXCEL" or Globals!RenderFormat.Name = "CSV",false,true)

This should only display the column when it is exported to Excel or as a CSV.

Also make sure you have the DataElementOutput property set to 'Auto' as if it is set to 'NoOutput' it will not export to .CSV