这个章节内容详细说明DevExpress开发教程之报表打印设计实现篇中的关键代码部分、简单的设计和打印应用。
1、DevExpress中 可以通过report.RunDesignerDialog或者report.RunDesigner来设计报表,这里没有使用这两个方法来实现报表设计 功能,而是使用第一章中的自定义的DesignReportForm来实现(实际上相同,但自定义可以控制其他如根据权限显示等内容)。
2、DesignReportForm非常简单,就是把DesignReportControl,DesignToolBar和 DesignFormattingToolBar拼凑在一起,它们共同关联designReportControl1.DesignPanel。
3、现在设计一个简单的DataSet,内容如下:
DataSet ds = new DataSet("DeliveryDataSet");
DataTable dtDelivery= new DataTable("Delivery");
{
dtDelivery.Columns.Add("BillId", typeof(string));
dtDelivery.Columns.Add("ManualId", typeof(string));
dtDelivery.Columns.Add("BillDate", typeof(DateTime));
dtDelivery.Columns.Add("CustomerId", typeof(string));
dtDelivery.Columns.Add("WarehouseId", typeof(string));
dtDeliv