Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 3.88 KB

tutorial-step-02-specify-connection-information-reporting-services.md

File metadata and controls

71 lines (47 loc) · 3.88 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic ms.custom
Tutorial: Specify connection information (Reporting Services)
In this lesson, you define a data source: connection information the report uses to access data from a relational database or other sources.
kfollis
kfollis
09/25/2024
reporting-services
reporting-services
tutorial
updatefrequency5

Tutorial: Specify connection information (Reporting Services)

After you create your project and report definition file, you define a data source and configure connection information for the report to access data from a relational database or other sources.

In this tutorial, you:

[!div class="checklist"]

  • Add the [!INCLUDE sssampledbobject-md] sample database as your data source.
  • Configure the connection string for the data source.

Prerequisites

Set up a connection

When you create reports in SQL Server Reporting Services (SSRS), establishing a data source is crucial. Follow these steps to set up a connection between a data source and your reports.

  1. Open your Sales Order report definition file (.rdl) in Visual Studio.

  2. In the Report Data pane, select New > Data Source. If the Report Data pane isn't visible, then select View > Report Data.

    :::image type="content" source="media/ssrs-table-tutorial-2-new-data-source.png" alt-text="Screenshot of the Report Data pane with the Data Source option highlighted.":::

    The Data Source Properties dialog opens with the General section selected.

    :::image type="content" source="media/lesson-2-specifying-connection-information-reporting-services/vs-datasource-connection-properties-dialog-box.png" alt-text="Screenshot of the Data Source Properties dialog.":::

  3. In the Name box, enter "AdventureWorks2022".

  4. Select Embedded connection.

  5. From the Type list, select Microsoft SQL Server.

  6. In the Connection string box, enter:

    Data source=localhost; initial catalog=AdventureWorks2022

    [!NOTE] This connection string assumes that [!INCLUDEssBIDevStudioFull], the report server, and the [!INCLUDE sssampledbobject-md] database are all installed on the local computer.

    Change the connection string and replace "localhost" with the name of your database server/instance if the assumption isn't true. If you use [!INCLUDEssExpress] or a SQL Server named instance, modify your connection string to include instance information. For example:

    Data source=localhost\SQLEXPRESS; initial catalog=AdventureWorks2022

  7. Select Credentials. Choose the Use Windows Authentication (integrated security) option.

  8. Select OK. Report Designer adds the AdventureWorks2022 data source to the Report Data pane.

    :::image type="content" source="media/lesson-2-specifying-connection-information-reporting-services/ssrs-adventureworks-data-source-2022.png.png" alt-text="Screenshot of the Report Data pane that highlights the AdventureWorks2022 data source.":::

Next step

[!div class="nextstepaction"] Step 3: Define a dataset for the table report (Reporting Services)