. Net frame work 3.5 ReportView
1. Create an rdlc file, design the UI, bind fields, and create a new dataset as the data source. The data is temporary and does not need to be persisted.
2. Create a winform page, pull a MicrosoftreportViewer, and select a new *. rdlc file report.
3. Data Binding: the push-pull model. Bind the data fields to be presented in the report and bind the data source.
Binding code:
ReportViewer1.LocalReport. CES. Clear ();
This. reportViewer1.LocalReport. CES. Add (new Microsoft. Reporting. WinForms. ReportDataSource ("dsNotice_Notice ",
Data. Notice ));
This. reportViewer1.LocalReport. CES. Add (new Microsoft. Reporting. WinForms. ReportDataSource ("dsNotice_Details ",
Data. Details ));
This. reportViewer1.RefreshReport ();
Data Source Name: dataset_table, for example, dsNotice_Notice.
Data Source value: Table object.
Multiple tables are added multiple times.
We recommend that you clear CES before binding each time.
Print: Reports are larger than the default horizontal printing, while reports are vertical printing.