Sei sulla pagina 1di 3

Hiding the Headers/Footers of an SSRS Report from Excel

I have many grid-type SSRS report deployed to SharePoint. Users want to save the report as an Excel
spreadsheet, but they dont want to spend time finding and deleting cells containing header information
such as the report title, company logo, date retrieved and so forth.
The simplest way to do this is to add a parameter that lets the user chose the full version of the report
or an alternative version with the header information removed.

First create a valueless parameter. In the Report Data pane, select parameters and create a new, empty
parameter. Name the parameter ExportExcel. The ExportExcel parameter doesnt have a dataset. We
will be adding the values manually.

Left click your ExportExcel parameter. Under the General tab, fill in the Name and Prompt fields. Select
Text as your data type and leave the visibility set to visible.

Donna Migliore is a practicing BI architect and loves SQL Server, SSRS, SSIS, and SSAS but is puzzled by
her love /hate relationship with SharePoint. Get more tips/tricks at her brain dump /blog SQL Stuff.

Now go to the Available Values tab. Click the Specify values button. Then click on Add, and fill in the
Label and Value fields. You only need a true and a false value. I use yes and no as my label because
that is what will appear in the parameter dropdown once the report is completed.

Next, click the Default Values tab. Click the Specify values button. Click Add again and enter false as the
value. A user will always see the entire report when opening the report, but will then have the option to
select the no-headers version.

Donna Migliore is a practicing BI architect and loves SQL Server, SSRS, SSIS, and SSAS but is puzzled by
her love /hate relationship with SharePoint. Get more tips/tricks at her brain dump /blog SQL Stuff.

Finally, add an expression to each piece of the header you wish to hide. Click your head or image box in
the header. In the Properties pan, go all way down to the bottom. Under Visibility, click inside the
Hidden box and erase the word false.

Then type in this expression: = IF(Parameters!ExportExcel.Value = True, True, False). You will need to
insert the same expression inside the Visibility>Hidden box for each text or image box you wish to hide.
Now your users will be able to Export to Excel without the report headers.

Donna Migliore is a practicing BI architect and loves SQL Server, SSRS, SSIS, and SSAS but is puzzled by
her love /hate relationship with SharePoint. Get more tips/tricks at her brain dump /blog SQL Stuff.

Potrebbero piacerti anche