Technology used : Visual Studio 2012 and SQL Server 2008
Step 1: Create a database named "Test" in SQL Server 2008 that holds a Table called "Employee" with 3 columns (ID, Name and Salary) , where the ID column is an Identity field and a Primary Key as in the following:
CREATE TABLE [dbo].[Employee](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](50) NULL,
[Salary] [int] NULL
CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
) ON [PRIMARY]
Then insert some data into the table as in the following:
insert into Employee (Name,Salary)values('A',50000)
insert into Employee (Name,Salary)values('B',10000)
insert into Employee (Name,Salary)values('C',60000)
insert into Employee (Name,Salary)values('D',20000)
insert into Employee (Name,Salary)values('E',10000)
insert into Employee (Name,Salary)values('F',70000)
insert into Employee (Name,Salary)values('G',40000)
select * from employee
Step 2: Create a new empty website named "RDLC_Start".
Step 3: Create a new page named "Default.aspx" by right-clicking on the project in Solution Explorer and click on "Add" -> "New Item".
Step 4: Add a ‘ScriptManager’ from the Ajax Extensions section, ‘SQLDataSource’ from the Data section and ‘ReportViewer’ Control from the Reporting section on the page.
Step 5: Right-click on the Selected ‘SQLDataSource’ control in Design Mode and use the following procedure:
- Click on "Configure Data Source", it populates a new window of Data Sources.
- Click on the "New Connection" button of the window, it shows the new connection window where you can fill in the details as mentioned:
Select the "Microsoft SQL Server (SqlClient)" as Data Source
Your Database Instance Name as SeverName
Use SQL Server Authentication Mode as "Long on the server"
Type the usrename as "sa" and enter the password of your database.
Select the Database Name as "Test".
And click the "OK" button.
- Now click on the "Next" Button.
- Check the checkbox and click on the "Next" button.
- Click on the "Next" button

shibuthomas mathaiPosted Oct 19, 2015, 1:21 AM
Thank you.It really help me..
saurabh kumar tanwarPosted Jun 5, 2014, 7:18 AM
Nice article