Using Charts In SSRS Reports

Hello Buddies!

In the previous tutorial, we saw how to generate a simple SSRS report. In this tutorial, let us see how can we use charts in SSRS reports.

The steps are

  • Create a data source that is pointing to the database used by your query. In this case, I am using AdventureWorks database.
  • Once you create the data source by providing the connection string, then create a new report, by providing the Query for which you want to generate the report. Follow the screenshots given below for more information.
  • Once you have created the data set by running the report generation wizard following the steps shown in the screenshots, double click on the chart control in the tool box, that will display you the choice of graphs to choose from. Select the bar chart and click ok.
  • Now double click on the chart to get the chart data area, where provide the Value by adding the one that has to come in Y axes, and below which add the category by choosing from the data set (It appears as X axes).
  • After renaming the chart, axes and grid displaying data, click on Preview to view the chart along with its data statistics.

The images below would guide you how to create a report with charts.

This slideshow requires JavaScript.

Hope you find it useful. Thanks for reading!!!

Advertisements

Getting Started with SSRS

Let us now take a look, how to generate a report using SSRS.

1) Open your Visual Studio

2) Click on File >> New >> Project

3) A Dialog Box will open from which select the Report Server option under the Business Intelligence Projects, as Shown below.

Add New Report Server Project

Add a New Report Server Project

4) Now, Go to the Solution Explorer >> right click on Shared Data Sources folder and Select “Add new DataSource” >> A dialog will open where you can provide the DataSource name and connection string details.

Add a new Data Source

Add a new Data Source

5) Now, right click on the reports folder >> Select  “add a new report” >> A Report wizard will appear

Report Wizard

Report Wizard

6) In the Report Wizard write your Query and View it from the Query Designer.

Design the Query

Design the Query

Query Designer

Query Designer

7) Select the View of the report and select the elements to be displayed and grouped and Click Finish. In the image below we are grouping the report based in PayFreequency column.

Grouping

Grouping the reports

8) Give a Name to your Report.

Name the Report

Name the Report

9) Now, your report will be generated with the extension .rdl that can be found in under the reports folder. In the design view, we will be able to align and format the reports where as we pan preview it using the Preview Tab.

Design View

Design View

Preview

Preview