I have a a column in a report that has it's visibility controlled by an expression.
=IIF(UCase(CStr(Fields!Condition.Value)) = "C",True,False)
When the condition is true, the column hides, when it is false, the column is visible. When I export to Excel and PDF, the rendered respects what this expression evaluates to, and shows the column appropriately.
CSV on the other hand, exports the column no matter that the condition evaluates to. I have tried placing this expression in the column visibility, textbox visibility and a bunch of other places. It doesn't matter where I put it, CSV exports it.
I know you can supposedly control the CSV output with the RenderFormat.Name = "CSV", but that seems like an all or nothing approach. I need it to sometimes to export to CSV and other times not. I really just need this expression to work.
Is this a defect in SSRS 2008 and just simply not possible?
CSV export is handled quite a bit differently than most SSRS exports: Most of the rendering instructions are ignored. It's considered a "Data Export" not a rendered output.
But the "DataElementOutput" property for the text cells will control whether a cell's contents are placed in the .csv (Textbox Property pane -> Data Only section -> DataElementOutput)
.csv export is designed to have a very stable set of fields exported, so that it can easily be used as an input to automated tools like SSIS - Jamie F 2012-04-04 14:38