Wanreds 你好,
1.下面是实现 SubReport 代码:
- //添加 SubReport
- Field subReportField = this._c1r.Fields["SubreportField"];
- C1Report subReport = new C1Report();
- subReport.Load("filename", "reportname");
- subReportField.Subreport = subReport;
- //把 SubReport 添加到 PageFooter 位置
- subReportField.Section = SectionTypeEnum.PageFooter;
- //设置在 SubReport 之前换页
- this._c1r.Sections["PageFooter"].ForcePageBreak = ForcePageBreakEnum.Before;
复制代码
2.楼主还可以参考 C1 随机安装的 Demo:
Documents\ComponentOne Samples\Studio for WinForms\C1Report\C1Report\Cs\SubReportDataSource |