Creating a SSRS Client Side Report is relatively easy by using dot net features without a need to use SSRS reporting service.
In a scenario where Report with only pdf or
excel file to be generated, SSRS
client side Reporting can be employed eliminating the need of SSRS report server.
One can create it using wizard or without wizard. In this
article I will try to show you how to create a client side report using wizard,
which will really be helpful for beginners. In subsequent articles I will try
to manipulate your report by rendering db outputs.
To create SSRS Client side Report
Using the code
1. 1. Create Blank website first.
2. 2, In web.config file modify your database connection string
name="NorthwindConnectionString" connectionString="Data Source=.\MSSQLSERVER2008;Initial
Catalog=Northwind;Persist Security Info=True;User ID=sa;Password=password" providerName="System.Data.SqlClient"/ </connectionStrings>
3. 3. Right click on app_code folder of solution explorer and select add item and then add a dataset as shown in figure
1. 4. It will add an Dataset.xsd file in your app_code folder.
1. 5. Click on Toolbox link(See at Center, the 2nd hyperlink). If you click on
the link , for a moment you can see the toolbox. Select table adapter and drop
it in the container.
Or Right click on the container and select add—table
1. 6. Select your connection string from the dialog box.
7. Click Next
8. Since this article is for beginners , we will go by first option i.e use SQL
statement and click next.
1. 9. Click on Query Builder
1. 10. It will show you list of tables/views etc.Select a table and click on Add followed
by close button.
11. Or one can directly write query in the query window like select * from employees
12. Click Next
14. Save the File
15. Right click on Solution Explorer and select add item followed by select Report
16. Then using report toolbox add a table
Drag the fields from toolbox to table details row as shown
in the above figure.
17. Then in your aspx page go to tool box and Select Microsoft Report Viewer control.Add
it to the form
18. Then Click on Right top corner of Report viewer and select the report
19. It will add a ObjectDataSource just below the report viewer control in the form,
which needs to be configured.Click on right top corner of ObjectDataSource and
select configure Data Source
20. Then click Next as shown below followed by Finish.
Finally run your web page to get the following output
As demonstrated above , one can create simple report using dotnet , without report server involvement.
In our next article we will see how to use procedure to create report.
Moreover you can export the output of this report to excel or pdf format from its toolbar.