SQL Reporting services also known as SSRS is a great tool to create report from database. In this article we will learn how to create a basic Report. We will learn how to create a shared data source so we can use it for all the reports in our project, How to create our data set to bind columns in report. For advanced report see my other article SSRS subreport with drill down step by step in sql server 2008
Step to create our first report:
We have created a blank project without any data source and without any default report because we will create our data source and reports step by step. As you can see there two folders created
Let’s create our shared data source first which we will use for our all the reports in this project
Here is our all the settings:
We set our shared data source, time to create a procedure or write Sql statement to get data for report, since it is our first report so we will not use complicated procedure with different parameters but very simple Sql statement
SELECT * FROM [Suppliers]
Now we will create our first report, we will use blank report without using report wizard, so let’s create it.
It will open a blank surface to design our report, here we will add report header, footer and a table to design the report.
To add report header
Similar to report header we can add report footer and its contents, like report generation date.
To add report content (supplier detail)
Now we will add column to this table
Once you added your all the columns, click preview to see the result, it is working but One thing we are missing, alternate row color for data, so let's add it
Paste following into the expression pan
= IIf(RowNumber(Nothing) Mod 2 = 0, "Transparent", "WhiteSmoke")
Here is our created report
Was not it so easy to create the report by using Sql Reporting Services? In our next article we will create some advance report like sub-report with drill down feature
Having 13+ years of experience in Microsoft Technologies (C#, ASP.Net, MVC and SQL Server). Worked with Metaoption LLC, for more than 9 years and still with the same company. Always ready to learn new technologies and tricks.
|By Ali Adravi On 10 Sep, 13 Viewed: 1,119|
sql reporting subreport with toggle To create a toggle sub report in sql reporting service is too easy but if you will not aware about it then it is really difficult for you. So in this article we will see how to create a report with having sub report, and sub report data will load only when we... By Ali Adravi On 09 Sep 2013 Viewed: 11,686
In SQL server there are decimal and money data type to store precision and scale both together or say decimal values. Suppose we want to get precision and scale separately then how to get it. There are many ways to do this but there is a function in SQL named PARSENAME which can be used to get... By Myghty On 26 Mar 2013 Viewed: 3,311
To write a good performing procedure or function we should be aware about available wildcards in SQL Server. I found most developer depends on ‘%’ wildcard only while we have others as well. In this article we will discuss all the available wildcards in detail with examples. First of all let’s see... By Dev D On 25 Feb 2013 Viewed: 666
When we need to concatenate two columns simply we can use `+` sign and that is correct, but what if any of them is null, Will it return what we want, NO, it will return null. So let's discuss how we should concatenate two or more columns without creating extra space or extra comma problem. Let's... By Ali Adravi On 13 Feb 2013 Viewed: 12,556
Bulk insert is used to Import a data file into a database table or view in a user-specified format. It's not daily using kind of code, so it's very common question on most of the site like. How to import CSV file into a table? How to insert records from a CSV file to a table, delimited by comma?... By Ali Adravi On 08 Feb 2013 Viewed: 17,173