Introduction

This Knowledge Base article describes how to include a SQL Server Reporting Services (SSRS) Report in a View.

Audience
  • Developers
  • SSRS Report users
  • View Designers
Required Knowledge
  • SSRS Reports
  • Views
  • Controls

Example Scenario

In the scenario below we will use the Content control to surface a SSRS Report in a View.

Note: It is assumed that a SSRS Report already exists and has been deployed to a report server.

Follow the steps below to set up the scenario:

  • Create a View that contains a Content control.
    Image
  • Use the following information to create a SSRS URL:

    Example:

    http://localhost/ReportServer?%2f[{Report Path}]%2f[{ReportName}]&rc%3aToolbar=false&rs%3aCommand=Render [&<>=<>]

    Where [&<>=<>] is optional, but required if parameters are needed for the report.

    So if your report was \My Project\My Report and there was a MyParameterID as a report parameter as per the screenshots below;

    Image
    Image

    then the URL would be:

    http://localhost/ReportServer?%2fMy Project%2fMy report&rc%3aToolbar=false&rs%3aCommand=Render&MyParameterID=4

    More information on URL access can found here: http://msdn.microsoft.com/en-us/library/ms153586.aspx.

  • Add the SSRS URL created above to the URL property of the Content control.
  • Select the option to show the Preview. The SSRS Report is displayed on the canvas.
    Image
  • Finish the View, then Run the View.
  • The SSRS Report is surfaced within the Content control at runtime.
    Image