Thursday 28 February 2013

[SP2010] - Limiting the Reporting Extensions in SSRS 2012 SharePoint Integrated Mode

By default, the Report Viewer web part in SharePoint allows you to export published reports in various rendering formats. See screenshot below: 




If you would like to limit these rendering extensions on your SharePoint farm you can use the PowerShell command listed below.  The script finds an SSRS application called "SSRS Service App"  (remember to replace this with then name of your SSRS service app) and hides the XML export options from the Actions menu.

 $apps = Get-SPRSServiceApplication | where {$_.name -like "SQL Server SSRS"}  
 Set-SPRSExtension -identity $apps -ExtensionType "Render" -name "XML" -ExtensionAttributes "<Visible>False</Visible>"   
 Set-SPRSExtension -identity $apps -ExtensionType "Render" -name "CSV" -ExtensionAttributes "<Visible>False</Visible>"   
 Set-SPRSExtension -identity $apps -ExtensionType "Render" -name "MHTML" -ExtensionAttributes "<Visible>False</Visible>"   
 Set-SPRSExtension -identity $apps -ExtensionType "Render" -name "WORDOPENXML" -ExtensionAttributes "<Visible>False</Visible>"   
 Set-SPRSExtension -identity $apps -ExtensionType "Render" -name "IMAGE" -ExtensionAttributes "<Visible>False</Visible>"   
 
In my example the end result will only show the PDF and Excel extensions as below.