Buy me an espresso

April 15, 2008

Reporting Services ... Customizing the RSViewerPage.aspx Page

Overview ... Monday morning QB
Upon installation of Reporting Services there is a ReportServer folder created under the LAYOUTS directory that contains the .aspx files necessary to display reports. The primary file used for the display or reports is RSViewerPage.aspx. This page contains a large web part called ReportViewerWebPart. This web part includes both the toolbar/actions menu of the report, the report itself, and the parameters pane ... all in that one webpart. Mistake #1 by MS.

Another fun fact I noticed is that these pages are not child pages of a master. They are just stand alone .aspx files. Mistake #2 by MS. Hints, these pages do not include the global placeholders/navigation of the default.master nor the neighboring application.master (also found in the LAYOUTS directory).

When you deal with MS support these are they types of answers you get when you bring up such issues ... basically, wait till the next version.

Since by default the RSViewPage.aspx does not contain the global SharePoint navigation ... let's take a look at how to include it in the report page.

1. Make a backup of

2. Register the following at the top of the page:

Inlcude the following references inside the HEAD tag:

4. Place the following OnLoad event inside the BODY tag:
onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();

5. Add the folowing lines of code:
  • The ms-globalTitleArea TD class will contain the background image for the theme.
  • The Logo.gif image represents the site logo
  • Use id=onetIdTopNavBarContainer and class=ms-bannerContainer for the TopNavBar
  • The wssuc:TopNavBar is the SharePoint top navigation.
That should do it!

I ran into some other issues that were installation specific ... so don't expect this to work perfectly for everyone ... but it will get you at least 90% of the way there.


Anonymous said...

This just killed the RSViewerPage completely. :(

Mark said...


Can you tell me what is supposed to be displayed for Point 2 - its not showing so i can't get this to work.

Mark said...

I viewed the source on th page and found the 3 missing lines - as you say this gets you 90% of the way there (i can't post them here as it wont allow script - probably why they aren't showing in your post - could you add them as a picture file?).

Do you know if there is a way to get it to look at a specific master page? It presently seems to be pointed to the site default template.

Richter said...

Hey Mark,

Email me at ... I will be more than happy to get you up an running and give you the 3 @register for #2 if they aren't showing up.

Vincent said...


When activating "Publishing Infrastructure" feature on my site collection, if I open a report (with my new RSViewerPage.aspx), the Top Link Bar menu sucks...

Can you help me ?


Richter said...


What is the specific issue you are experencing? Is there an error on the page or in the lower left hand corner of the browser with an exclaimation point?

Have you tried a file comparison to the page before you turn on the feature and after you turn on the feature to see what changes?

Anonymous said...

Hey Mark,
I attempted to do what you said and my page does not display at all. I get the standard "unknown error" page from Sharepoint. Does this work with MOSS2007?

Any way you could send me a page that you know works?

maparash said...

works like a charm !! Thanks a lot ... But i would love to get the default.master on this aspx page rather than bit and pieces of it.


TabulaRasa said...

How do you do this in SharePoint 2010?