oOo Testing1 oOo
oOo Testing1 oOo

Reputation: 197

SSRS REPORT Invisible columns shown when exported to .csv

I have a SSRS report.I had used an expression in the hidden property in the tablix member. My intention is to show only those records which evaluates to 'false' for the expression.

When i export this report to excel, everything is working is fine, i.e hidden records are not shown, but when i export this same report to .csv then hidden records are also shown.

I had tried using =iif(Globals!RenderFormat.Name="CSV", True, False) in the hidden property and also tried changing the "DATA ELEMENT OUTPUT" from auto to output, but they didn't worked.

Does anyone solved this problem earlier ??

Upvotes: 4

Views: 5682

Answers (2)

Hue Truc
Hue Truc

Reputation: 27

CSV or XML is data renderer and it only cares about data. It means the data is still included in CSV file even they are hidden in excel exporting. To hide some fields, you should set DataElementOutput = "NoOutPut".

Upvotes: 2

Nathan Griffiths
Nathan Griffiths

Reputation: 12776

The "Hidden" property is a formatting property of the report items. When exporting to CSV, all formatting and layout properties are ignored, therefore any data present in the report will be exported to the CSV file, regardless of the value of the "Hidden" property.

One workaround is to use an expression to set the value of the report item such that it is set to nothing or zero instead of being hidden (or as well as being hidden).

Upvotes: 1

Related Questions