This post is for newbie who just wants to get started with SQL Server Reporting Services 2008. We will learn below things here
- Create new SSRS project with MS SQL Server database connection.
- Generate first report.
Prerequisites :
So let’s start step by step now.
In Visual studio, select File >> New Project (Figure 1) to create new project.
Figure 1
As we select new project here, dialog box will come up (Figure 2) where we
can select type of project like SSRS,
SSIS project etc and assign name and path to this new project. Here we select
either Report Server project wizard or Report Server Project to make our new SSRS
project. Wizard will guide us step by step to make new report and same we will see
in below part of this post. As we select OK here, it would create new project
for our first SSRS project in target directory.
Figure 2
It shows report
wizard dialog box now and we can connect MS SQL database here (Figure 3). We
can see in dropdown “Type” that we can also work with other datasource too like
XML, oracle etc.
Figure 3
We select MS SQL and click on button “Edit” (Figure 3) to
configure details related to our database like server name, credential details
and target database. After configured it, we can verify it with button “Test
Connection” (Figure 4) to check whether connection is established or not.
Figure 4
As we click OK here, Wizard asks for design query for this
report (Figure 5). We can assign query or we can make store procedure and can
assign it too. By default, wizard considers it as query type. You can explore
other options with button “query builder”. We have taken simple query here
which fetch data for fields name and email addresses of contacts from database
adventureworks and now its time to Click Next.
Figure 5
Wizard comes up with default selection “tabular form” in
report type now (Figure 6) so that our “contacts” from database would be
printed on tabular form in reports.
Here. Click on next button now.
Figure 6
In Next step, we can choose how to show data in report.
Wizard will include all fields in Available Fields section (Figure 7) as per
configured datasource, from where we can select fields which we need to show in
detail section. As we are going for
simple tabular report here, we don’t need to select any field for grouping. We
will see grouping based report in some next post.
Figure 7
So its done. As we
click on next, it would show report summary and report name (which we can
change here too, We are ready with our new report now. Just need
to click finish now.
We can see report design here and can preview it.
We can also change report design or datasource detail in report design.
We can preview report by click on button Preview and export
to either PDF , Excel, HTML, Word, CSV, Tiff File (Figure 8).
Figure 8
Congratulations!! we are done with the first report. We will see more report building tutorials in the future posts.