It is time to end. The more I feel that I cannot grasp the content of the essay, the more I have explained the content above. If there is anything I don't understand, my code: http://files.cnblogs.com/waxdoll/RDLCReport.rar. The main content of the Code is how to customize the document printing for the RDLC report.
Download content includes:
The code for calling the report browser in other forms is as follows:
// Create a report browser object
RDLCReport. ReportViewer frmRPT = new RDLCReport. ReportViewer ();
// Specify the Data source displayed in the list report. We recommend that you change MainDataSet and DrillDataSet to the System. Data. DataTable type to facilitate the call.
FrmRPT. MainDataSet = this. dsMain;
// Set the data source name for the list report, which must be the same as the data source name in the data area in the report.
FrmRPT. main1_cename = "DataSet_Main ";
// Report name, which is the identifier used to store the report page settings
FrmRPT. ReportName = "DataList ";
// Specify the data source for Drilling Reports
FrmRPT. DrillDataSet = this. dsDrill;
// Specify the data source name for the drill-down report
FrmRPT. DrillDataSourceName = "DataSet_Drill ";
// Specify the report path
FrmRPT. ReportPath = System. Windows. Forms. Application. StartupPath + @ "\ Reports \ rptReport. rdlc ";
// Display the report Browser
FrmRPT. ShowDialog ();
Welcome to exchange and provide valuable comments.
Related essays:
RDLC Report (1)
RDLC Report (2)
RDLC report (III)
RDLC Report (4)
RDLC report (5)
RDLC report (6)
RDLC report (7)