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
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"

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With