Reputation: 2890
I am trying to hide two textboxes from my DrillDown Report when exporting to excel but with no luck.
I also add expression to the visibility property of each textbox as below but still doesn't work:
=IIF(Globals!RenderFormat.Name="EXCEL",true,false)
as well as
=IIF(Globals!RenderFormat.Name = "EXCELOPENXML" OR Globals!RenderFormat.Name = "EXCEL", false, true)
The two textboxes "ExpandAll" and "CollapseAll" are being used just to refresh the same report with a parameter to expend/collapse the rows in the drilldown report which are not necessary to be shown in excel when being exported.
Any help would be very appreciated.
Ref: MSDN: Changing Reports at Run-Time
Ref: MSDN: RenderFormat
Upvotes: 3
Views: 3495
Reputation: 321
I believe your second expression is correct,
=IIF(Globals!RenderFormat.Name = "EXCELOPENXML" OR Globals!RenderFormat.Name = "EXCEL", false, true)
Make sure the Action property after you click on ExpandAll or CollapseAll actually points to the same report/same URL/same directory
as your current one. For eg,
"http://localhost/ReportServer/MyReports/MyReportName"
Upvotes: 2
Reputation: 15037
For SSRS in 2012, the correct syntax would be:
=IIF(Globals!RenderFormat.Name="EXCELOPENXML",true,false)
They cleverly changed it for the 2012 edition.
FWIW, your 2nd attempt had , false, true )
where it should be , true , false )
. This is a really unintuitive property in SSRS, the UI calls it Visible but the actual property is Hidden, so everyone always gets confused ...
Upvotes: 1