Jaa


Lesson 3: Creating a Report Model Using Management Studio

New: 5 December 2005

Creating a report model in Report Manager or Management Studio is a two step process: you first need to create the data source, and then you can generate the model. A data source is a connection string that indicates the location of the data that is to be used by Reporting Services to create a report model and by the report server when running Report Builder reports. In this lesson, you will use Management Studio to create a data source and report model, and then view the report model in Report Builder.

To open Management Studio

  1. Click Start, point to All Programs, point to Microsoft SQL Server 2005, and then click SQL Server Management Studio.

    The Connect to Server dialog box appears.

    Note

    If the Connect to Server dialog box does not appear, in Object Explorer, click Connect, and then select the server type to which you want to connect.

  2. In the Server type drop-down list, select Reporting Services.

  3. In the Server name drop-down list, select the server where you want to create your model.

  4. In the Authentication drop-down list, select Windows Authentication.

  5. Click Connect.

    When the connection is established, the Microsoft SQL Server Management Studio window appears.

To create a data source

  1. In Object Explorer, expand Home.

  2. Right-click the Data Sources folder, and select New Data Source.

    The New Data Source dialog box appears.

  3. In the Name box, type:

    MS_ASCube

  4. In the Description box, type:

    This is the Report Manager data source file for the SSAS cube.

  5. Verify that the Enable this data source for reports check box is selected.

  6. In the Select a page area, click Connection.

  7. In the Data source type drop-down list, select Microsoft SQL Server Analysis Services.

    Note

    The connection type must be either Microsoft SQL Server or Microsoft SQL Server Analysis Services (SSAS) for it to be used as a model source. To create a report model based on a SQL Server database, select Microsoft SQL Server.

  8. In the Connection string box, type

    Data Source=localhost;Initial Catalog="Adventure Works DW"

  9. Select Windows integrated security.

  10. Click OK.

    The MS_ASCube data source is created and appears in the Data Sources folder.

To create a report model

  1. In the Data Sources folder, right-click MS_ASCube, and then select Generate model.

    The Generate Model dialog box appears.

  2. In the Name box, type the following:

    MS_ASCubeReportModel

  3. In the Data Source name box, verify that Home/Data Sources/MS_ASCube appears.

  4. In the Generate the model in this folder box, specify the folder where you want to save the model.

    Note

    If you have previously deployed models, a Models folder probably exists on the report server.

  5. In the Description box, type:

    This is the AdventureWorks AS cube-based model created using Management Studio.

  6. Click OK.

    The MS_ASCubeReportModel model is created in the folder that you specified. You can move the report model to another folder on the report server by right-clicking the report model, selecting Move, clicking the ellipsis () button, selecting a folder on the report server, clicking OK, and then clicking OK again.

To explore the model in Report Builder

  1. Open your Internet browser.

  2. In the Address bar, type the URL for your report server.

    By default, the URL is http://<servername>/reports.

  3. Press Enter.

    The Reporting Services Home page opens in your browser.

  4. Click Report Builder.

    The Report Builder window appears.

  5. In the Getting Started pane, locate MS_ASCubeReportModel.

    This report model appears exactly the same as the model that you created in Lesson 2. Notice that the there are several items nested below the MS_ASCubeReportModel model. These nested items are perspectives. When a report model is created from an Analysis Services cube, the cubes in the SSAS database are displayed as perspectives in Report Builder. The top level model cannot be used to generate reports; instead, you must select one of the nested perspectives.

  6. Select the Channel Sales perspective, and then click OK.

    On the Explorer pane, notice that the name of the perspective that you selected appears at the top of the pane, and the cube contents are displayed as entities and fields.

  7. To exit Report Builder, on the File menu, click Exit.

Next Steps

Congratulations, you have successfully completed this tutorial. You created two SSAS cube-based report models, one by using Report Manager and the other by using Management Studio.

See Also

Concepts

SQL Server 2005 Analysis Services Tutorial

Other Resources

Generating Models Using Report Management Tools
Working with Report Builder (Ad Hoc Reports)
Introducing SQL Server Management Studio
Developing Analysis Services Solutions and Projects
Working with Data Sources (Analysis Services)
Working with Data Sources How-to Topics (SSAS)

Help and Information

Getting SQL Server 2005 Assistance