user961714
user961714

Reputation: 731

SSRS 2008 Stop Tablix from Exporting to CSV

I have two Tablix controls on my SSRS report. I want one of them to export and one not to export. I have accomplished this by setting the hidden property on the one I want to export to:

"=Globals!RenderFormat.IsInteractive = True"

and the one I do not want to export to:

"=Globals!RenderFormat.IsInteractive = False"

This works perfectly when I export to Excel, however CSV simply ignores these values and exports both Tablix controls. I need to know how I can force CSV to only export one Tablix control.

Upvotes: 0

Views: 5133

Answers (3)

Charles
Charles

Reputation: 11

You can't conditionally set the DataElementOutput, but you can conditionally set the tablix filters. That will leave the header row in the csv output, but trims the data rows.

Upvotes: 1

Registered User
Registered User

Reputation: 8395

Format options such as expressions on visibility are ignored for CSV rendering methods. CSV rendering methods are essentially data flows, so you can suppress elements that you don't want to include in CSV files by changing the DataElementOutput from Auto, the default value, to NoOutput.

Upvotes: 2

dev_etter
dev_etter

Reputation: 1186

Try setting the visibility.hidden property of the tablix you don't want to export to CSV to:

=(Globals!RenderFormat.Name = "CSV")

http://blogs.msdn.com/b/robertbruckner/archive/2010/05/02/globals-renderformat-aka-renderer-dependent-report-layout.aspx

Upvotes: 0

Related Questions