Conditionally suppressing entire report header
I want to suppress the entire header when the user exports to Excel. I can use the rc:SimplePageHeader=True if I am invoking the report directly into Excel. However I need a way to do this when the user selects Excel as an export option after rendering the report in the Report Viewer and since this is a shared environment with other groups I can't request any across the board change to the configuration file. The header object does not have a Visibility/Hidden property so the closest I can get is to add "=iif(ucase(Globals!RenderFormat.Name)="EXCEL",True,False)" to the Visibility/Hidden property of every single object within the header, however this still leaves a single blank row as the first row in the Excel output. Any ideas?
July 8th, 2011 3:36pm

Hi, As you can set Visibility/Hidden property, there is one more workaround to suppress the hearder, but this will apply to all the reports on server You can change rsreportserver.config file and replace <Extension Name="EXCEL"..... line with below code... <Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"> <Configuration> <DeviceInfo> <SimplePageHeaders>TRUE</SimplePageHeaders> </DeviceInfo> </Configuration> </Extension> Note:- Please make sure to take a backup of config file before you make any change.... If you want some more information on device info setting kindly visit http://msdn.microsoft.com/en-us/library/ms156281.aspx There is already a connect item for this feature, https://connect.microsoft.com/SQLServer/feedback/details/445058/page-header-display-on-first-and-last-page-should-have-formula-option - Chintak (My Blog)
Free Windows Admin Tool Kit Click here and download it now
July 9th, 2011 9:18am

Regarding you comment about setting the Hidden property of "every single object within the header", you can place all of the header report items into a rectangle and then manage the visibility of the entire group using the Hidden property for the rectangle. As you said, this doesn't collapse or hide the page header.Paul Turley, MVP, www.SQLServerBIBlog.com *Please vote if helpful*
July 10th, 2011 2:11am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics