Yesterday, I encountered a problem in the production of the orders table. Today I decided to use the form of the suborders table to explain the problem. I have taken an exam in this article: http://www.cnblogs.com/waxdoll/archive/2006/10/13/458409.html. In fact, this article is quite concise, but it still encountered some problems during the process, these questions will be listed for your reference and attention.
1. The data source of the Add sub-tables Table can only be added in the data source method SubReportProcessingEventHandler.
This. reportViewer. LocalReport. SubreportProcessing + = new Microsoft. Reporting. WinForms. SubreportProcessingEventHandler (SubReportProcessingEventHandler );
Private void SubReportProcessingEventHandler (object sender, Microsoft. Reporting. WinForms. SubreportProcessingEventArgs e)
{
E. DataSources. Add (new Microsoft. Reporting. WinForms. ReportDataSource ("dsOrder _ order details", this. dsOrders. Order details ));
}
2. whether it is a primary table or a subpartition table, the name of the dataset in the specified data source must be consistent with the name of the dataset in the table or list, otherwise, the primary and secondary tables cannot be displayed. I just did not pay attention to this issue for an hour.
In summary, today is just a little more profitable.