SSRS 2008 report header holding the company logo and report title when exporting to excel or csv formats

SSRS 2008 report header holding the company logo and report title when exporting to excel or csv formats

I need to surpress the report header holding the company logo and report title when exporting to excel or csv formats, how can I do this in SSRS 2008?

Hiding items using a parameter...
Create a Boolean type parameter.  I'll call it HideHeader
Place all of the header items in a rectangle in the top area of the report body.
In the Hidden property for the rectangle, use the expression:
=(Parameters!HideHeader.Value)

Hiding the header only for Excel rendering...
Again, this is new feature in SSRS 2008 R2.
Use the new RenderFormat object in an expression on the Hidden property, like this:
=IIF(Globals!RenderFormat.Name="EXCEL", True, False)

...actually the IIF function is unnecessary.  You could use the same logic as my first example:
=(Globals!RenderFormat.Name="EXCEL")

 

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright