Home Dashboard Directory Help

Hide columns during excel/xml export in SSRS 2008 by Umesh ME


 as Fixed Help for as Fixed

Sign in
to vote
Type: Suggestion
ID: 526595
Opened: 1/22/2010 12:11:49 PM
Access Restriction: Public


I have a SSRS 2008 Report, which is embeded in ASPX page, i would like to hide some columns during the export to excel/xml...

please let me know is there any way to do???

I think it is missing in SQL Server Reporting Services...


Sign in to post a comment.
Posted by Praveen Inavolu on 2/4/2010 at 10:56 AM
For XML, DataElementOutput can accept the following values only(Output,NoOutput,ContentsOnly,Auto). You can use NoOutput to hide the columns. But since this property can't be set through expression, it is not possible to hide the columns based on Render format.

For Excel, You can use Globals!RenderFormat to hide columns
ex: (for Hidden property set the expression as =IIF(Globals!RenderFormat.Name="EXCEL",true,false)). The issue which i observed from this approach was, blank column(s) will be shown in excel for the column(s) hidden in reports
Posted by Microsoft on 2/1/2010 at 11:43 AM
I am closing this item. Let us know if you have further questions.
Posted by Microsoft on 2/1/2010 at 11:41 AM
Hi, Thanks for filing the issue.
For hiding columns in XML, you can set the DataElementOutput as False for corresponding column.
For hiding columns in Excel, you can use the new Globals!RenderFormat function which will allow you to have specific layout or behavior based on the type renderer. RenderFormat is available in SQL Server 2008 R2 release (CTP3 of which is available for public currently)
Sign in to post a workaround.