Lesson 2: Defining a Data Source for Your Report Model

After creating a report model project called ModelTutorial, you need to define one data source from which you will extract business intelligence data and metadata. In this tutorial, you will define the AdventureWorks2008R2 sample database as your data source. This tutorial assumes that this database is located in an instance of the default SQL Server on your local computer. In a production environment, the source databases are frequently hosted on one or more remote computers.

To define a data source for a Report Model project

  1. In Solution Explorer, right-click Data Sources and click Add New Data Source.

  2. On the Welcome To The Data Source Wizard page, click Next.

    The Select How To Define The Connection page appears. On this page, you can define a data source based on an existing connection or on a previously defined data source object (from within the current solution or within another Report Model project), or define a new connection. In this tutorial, you will define a data source based on a new connection.

  3. Verify that Create a data source based on an existing or new connection is selected, and then click New.

    A Connection Manager dialog box appears. In this dialog box you define connection properties for the data source.

  4. In the Server name text box, type localhost. If you are working with a named instance rather than the default instance, type localhost\<instance name>.

  5. Select Use Windows Authentication.


    If possible, avoid using your domain credentials for the data source connection. If you publish a model that includes your domain credentials, users who run the model will do so using your security profile. If you must use your credentials, be sure to replace them with the credentials that you want model users to use when they access the model using Report Builder.

  6. In the Select or enter a database name list box, select AdventureWorks2008R2.

  7. To verify that the connection works, click Test Connection.

    If the connection works, click OK. If the connection does not work, verify that the information you entered is correct.

  8. Click Next.

    The Select how to define the connection page appears again.

  9. Verify that the Create a data source based on an existing or new connection option is selected, verify that localhost.AdventureWorks2008R2 is selected in the Data connections list box, and then click Next.

  10. In the Data source name box, type ModelTutorial, and then click Finish.

    By default, the name of the database that you selected is displayed. However, you can use a different name to name the connection. The connection name can contain spaces. When you click Finish, the .ds file is created and displayed in the Data Sources folder in the ModelTutorial project.


To edit the properties of an existing data source, double-click the data source in the Data Sources folder to display the data source properties in Data Source Designer.

You have successfully defined the ModelTutorial data source for the ModelTutorial project. Next, you will create a data source view for your model. See Lesson 3: Defining a Data Source View for Your Report Model.