文档彩票走势图>>FastReport中文文档>>示例 5.打印行列重复的表格
示例 5.打印行列重复的表格
private void Table1_ManualBuild(object sender, EventArgs e) { // --------- printing row 0 Table1.PrintRow(0); // printing column 0 Table1.PrintColumn(0); // printing 3 copies of column 1 for (int i = 0; i < 3; i++) Table1.PrintColumn(1); // printing column 2 Table1.PrintColumn(2); // --------- printing 3 copies of row 1 for (int j = 0; j < 3; j++) { Table1.PrintRow(1); // printing column 0 Table1.PrintColumn(0); // printing 3 copies of column 1 for (int i = 0; i < 3; i++) Table1.PrintColumn(1); // printing column 2 Table1.PrintColumn(2); } // --------- printing row 2 Table1.PrintRow(2); // printing column 0 Table1.PrintColumn(0); // printing 3 copies of column 1 for (int i = 0; i < 3; i++) Table1.PrintColumn(1); // printing column 2 Table1.PrintColumn(2); }
我们在每一行中打印的列数是相同的。在本例中,表格的中间行和中间列被打印了 3 次。因此,我们得到了以下结果: