实例化模版对象的两种方式:
1. 模板名称 对象名称 = new 模板名称();
2. 使用ReportDocument
ReportDocument report = new ReportDocument();
string reportPath = Server.MapPath("UserInfoForm.rpt");
report.Load(reportPath);
设置模板的数据源:report.SetDataSource(DataSetObjectName);
给模板参数传值:report.SetParameterValue("参数字段名", 值);
绑定模板到显示控件:BasePrintForm.ReportSource = report;
对模版对象进行操作:report.ReportDefinition.ReportObjects["Title"].MethodName;
对子报表对象进行操作:report.Subreports[子报表名称].ReportDefinition.ReportObjects["xx"];
其他:
关于模版对象的宽度:使用567*N,N为厘米数