Labels

Monday, 2 May 2016

What is SSRS ? Provide one sample example to create the Report ?

SSRS

* SSRS is one of a reporting tool to develop and manage reports.
* We can develop static as well as dynamic reports
* Reports are stored in xml format with the extension .rdl
* We can develop the reports with
                * Parameters
                * Drilldowns
                * Drillthroughs
                * Actions
                * Dynamic grouping
                * Charts
                * Gauges (2008) etc
* Reports can be rendered in various formats like .pdf, .xls, .doc, .gif etc
* We can generate reports from different sources like Oracle, SQL Server, Teradata, xml etc

  Features

                * Report development and deployment is easy and fast
                * We can customize reports using .net langs
                * We can use .dlls and webservices
                * We can render into various formats
                * We can deliver reports on scheduled basis
                * Reports can be accessed through browser
                * We can manage reports through browser (Report Manager)

Ex:          Developing simple report from emp table of SSRSDB database.

Steps

1. Creating SSRSDB database

                * Go to SSMS --> start-->run--> ssms
                * Take new query
                                use master
                                go                                           acer123/?
                                create database SSRSDB

2. Creating Sample table

                                use SSRSDB
                                go
                                create table emp(empid int,ename varchar(40),sal money, deptno int)
                                go
                                insert emp values(1,'Sai',6000,10)
                                insert emp values(2,'Pankaj',7000,10)
                                insert emp values(3,'Kiran',5000,10)
                                insert emp values(4,'Rafi',16000,20)

3. Creating Report

                * Open BIDS (Start --> run-->devenv)
                * File --> New --> Project
                * Under Templates --> select "Report Server Project"
                                Name: EmployeeReports
                                Select required location
                * OK

4. Creating DataSource

                * Go to Solution Explorer
                * R.C on Shared DataSources-->Add New DataSource
                                Name:  ds_SSRSDB
                                Click on Edit-->
                                Server name: rehan-pc
                                Database     : SSRSDB
                * OK
                * OK

5. Creating Data Source and Dataset

                * Go to Solution Explorer --> R.C on Reports--> Add--> New Item
                * Under Templates select "Report"--> Add
                * Go to Report Data (View menu--> Report Data)
                * Click on New--> Data Source-->
                                Name:  ds_SSRSDB
                                Select "Use Shared Datasource reference"--> From dropdown list select ds_SSRSDB
                * OK
                * In Report Data --> R.C on ds_SSRSDB-->Add DataSet
                                Name:  dst_emp
                                Query: select * from emp
                * OK

6. Designing report

                * Go to Toolbox --> Place table on design surface
                                         --> Select empid,ename,sal column in the table

                * Click on preview

2 comments:

  1. Great explanation . Please try to add the screens too.

    ReplyDelete
  2. Many thanks Vidhya for reading the blog . Sure I will add the screens soon . Please touch with the blog for more technical stuff.

    ReplyDelete