Share via


How to: Use a Report Model as a Data Source

You can create reports in Report Designer that use a published report model as the data source type. This capability allows you to create predefined custom reports for clickthrough data exploration. For more information about how predefined reports are used in clickthrough data exploration, see Managing Report Models.

Before you can choose Report Server Model as a data source type, you must have a published model to work with.

You can specify a report model data source type for reports that you add to a report server project, or for reports that you create using the Report Wizard. The instructions in this topic assume you are adding a report to the current project. For more information about using the wizard, see Tutorial: Creating Model-Based Reports in Report Designer.

To create a report model data source type

  1. In Report Designer, add a report to the current report server project.

  2. In the Report Data pane, on the toolbar, click New, then click Data Source.

  3. In the Data Source Properties dialog box, type a name in the Name text box or accept the default name.

  4. Verify that Embedded connection is selected.

  5. From the Type list, select Report Server Model.

  6. In the Connection string text box, type a connection string that specifies a URL to a report server and a path to the model. The connection string you use depends on whether the report model is on a report server configured in native mode or in SharePoint integrated mode. Example connection strings for each mode are shown in the following list:

    • Native mode   server=http://TestServer/reportserver; datasource=/Models/AdventureWorks Model

    • SharePoint integrated mode   server=http://TestServer/TestSite; datasource=http://TestServer/TestSite/Documents/Adventure Works.smdl

    If you want to use localhost for the Web server, verify that TCP/IP is enabled. Otherwise, a connection error might occur. For more information, see Troubleshooting Server and Database Connection Problems.

    The model name is specified through the data source connection string argument. The argument must resolve to a fully qualified model name in the report server folder namespace. In the example, the folder is named /Data Sources, and it is a child folder of the root node in the report server folder namespace. The path must start with a forward slash. If you are not sure about the path, use SQL Server Management Studio or Report Manager to navigate the folder hierarchy. 

  7. On the Credentials tab, specify credentials to access the data source.

    Choose Windows authentication (integrated security) or stored credentials. If you choose prompted credentials, you will need to type credentials every time the report server establishes a connection to the data source. Do not choose No credentials unless you have configured the unattended execution account. For more information, see Specifying Credential and Connection Information for Report Data Sources.

  8. Click OK.

    This data source appears in the Report Data pane. To open the Report Model Query Designer so that you can create a dataset, right-click the data source, and then click Add Dataset, and then Query Designer. If the Report Model Query Designer does not appear, connection to the report model failed. Check the connection string and credentials to resolve the error and open the query designer.