文檔首頁>>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); }
我們在每一行中打印的列數(shù)是相同的。在本例中,表格的中間行和中間列被打印了 3 次。因此,我們得到了以下結果: