Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS Report Builder how to hide specific textbox exporting to Excel

I am trying to hide two textboxes from my DrillDown Report when exporting to excel but with no luck.

enter image description here

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

like image 228
Aung Myo Linn Avatar asked Jan 25 '26 08:01

Aung Myo Linn


1 Answers

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"

enter image description here

like image 193
U K A Avatar answered Jan 28 '26 01:01

U K A