This article explains how to add parameters to a SQL Server Reporting Service (SSRS) including how to create a new SSRS report and how to write a query with parameters. Okay let's start.
Step 1: Open your SQL Server Reporting Tools.
Select "File" -> "New" -> "Project..." then provide your project name and then click the 'OK' button.
Step 2: Here is the Report Wizard page; you should continue.
Step 3: Connect to your database. First click the "Edit" button.
Step 4:
- Choose your server name.
- To connect to your database use Windows Authentication or use SQL Server Authentication. I prefer Windows Authentication.
- Connect to the database you want to use, choose it from the ComboBox.
- Number 3 is optional.
- Click the 'OK' button.
Step 5: All of the configuration exists. If you want you can update your connection settings from there.
Step 6: We should write a new SQL query.
Step 7: In this step you can choose your table type.
Step 8:
Step 9:
Step 10: Write your Report Name and the result will be produced.
Step 11: Now I need a parameter. Create a new dataset.
Right-click then seelct "Add DataSet" then choose the dataset to be embedded in the report.
Step 12: Write your query with parameters.
Step 13:
Step 14: Now when you execute this query you see a TextBox. Write the product name and click "View Report".
No comments:
Post a Comment