我有6条数据记录,并希望在运行时添加4行空行以列出10行。我该怎么办?
答案 0 :(得分:0)
对于BeforePrint
事件中的数据源修改过程。请参阅示例代码段:
void report1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
DataDataSet ds = new DataDataSet();
this.sitE_SummaryTableAdapter1.Fill(ds.SITE_Summary);
foreach (DataDataSet.SITE_SummaryRow row in ds.SITE_Summary) {
double val = Convert.ToDouble(row["SITE_Summary.Heating_Energy_Transfer"]);
row["SITE_Summary.Heating_Energy_Transfer"] = convertTemperature(val, true);
}
this.report1.DataSource = ds;
}