SSRS Tutorial: Part 5 - Embedded Datasets

Introduction

Before reading this article, I highly recommend reading the previous part of the series.

This article explains the following,

  • What are Datasets?
  • What are Embedded Datasets?
  • Create Embedded Datasets using Stored Procedure.
  • Query Designer.

Dataset

Dataset represents report data returned from running a query on an external data source.

Embedded Datasets

  • Embedded datasets are specific to a single report.
  • Multiple reports cannot use embedded datasets.
  • Embedded datasets are helpful when you want to create a query that has no other dependencies.

Create Shared Dataset (Using Stored procedure)

To create Embedded Datasets, go to Report Data, right-click on Datasets, and select Add Dataset.

Add Dataset

The following wizard will appear so that you can see the list of shared datasets.

properties

Provide your dataset Name.

Select Use a dataset embedded in my report.

Select the Data source from a dropdown list (or click on New to create a new Data source)

Select Query type as Stored Procedure.

Next, click on Query Designer.

properties

Then you will see the following wizard, select the desired stored procedure, and click Edit as Text.

query designer

Click on [!] to run your procedure.

procedure

Define query parameters and click on Ok.

query parameters

At this point, we can see the following Output. Then click on OK.

output

Click on OK.

dataset properties

At this point, the Embedded Dataset was created. You can see it in Report Data.

Report Data

Conclusion

This article taught us about creating embedded datasets using Stored Procedures in SQL Server.

I hope you enjoyed this article. Please provide your valuable suggestions and feedback.


Similar Articles