Welcome to the FoxLearn
Today we will learn how to create a Report with parameters
First, You need to add a Button, a Report Viewer and two DateTimePicker to Form 1
Your data will show from date to date in the report when you click the load button
We will use the Northwind database to practice
You can download the Northwind database below this video
We will create a stored procedure to get orders from date to date
A stored procedure in SQL Server is a group of one or more Transact-SQL statements, or a reference to a Microsoft .NET Framework common runtime language method
Procedures resemble constructs in other programming languages because they can accept input parameters and return multiple values in the form of output parameters to the calling program
Contain programming statements that perform operations in the database
These include calling other procedures
Return a status value to a calling program to indicate success or failure
We will use Entity Framework to get data from stored procedure
You need to add a DataSource to report
A client report definition RDLC file includes dataset elements that define the data source structure used by the report
Report definition RDLC files are bound to DataSet objects or business objects that contain the data you need
You must add one or more datasets to the report before you can use the data in your report definition
After creating a dataset, you can drag a specific field to a data region or text box in the report
You need to add fromDate parameter and toDate to report parameters
This parameter displays in the report
We will set the DataSource and parameter to report
Thank you for watching this video