Introduced
A common requirement for any data-driven application is the report. However, the ASP.net 1.x does not provide us with this very important feature. Fortunately, however, the ReportViewer control that comes with. NET 2.0 can meet some of the basic requirements of your report. I'll show you how to use this control in this article. The ReportViewer control can be used in a Web program or in a Windows program. Here, I'll just explain how to use it in a Web program.
Example of a report
Let's say we want to generate a list of customer information as shown below:
The above report is a very simple list of customer information grouped by country. The data for the report is obtained from the Customers table in the Northwind database. By default, it displays all customer information. However, you can also have it display customer information that belongs to a particular country you specify.
The report is designed using the ReportViewer control, which can fetch data from a strongly typed dataset or from a custom collection of objects. In the actual program development, we tend to use a 3-tier architecture, data acquisition is often obtained from the business level dataset or a generic collection. Here, I intend to use a generic collection as a data source instead of a strongly typed DataSet.