using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; using System.Drawing; using System.Data; using FastReport; using FastReport.Data; using FastReport.Dialog; using FastReport.Barcode; using FastReport.Table; using FastReport.Utils; namespace FastReport { public class ReportScript { private void Table3_ManualBuild(object sender, EventArgs e) { DataSourceBase rowData = Report.GetDataSource("Data"); // init the data source rowData.Init(); // print the first table row - it is a header // now enumerate the data source and print the table body while (rowData.HasMoreRows) { // print the table body Table3.PrintRow(0); Table3.PrintColumns(); // go next data source row rowData.Next(); } } private void PageFooter1_BeforePrint(object sender, EventArgs e) { // FastReport 2017版判断最后一页的正确写法(Options设置中Double pass勾选) bool isLastPage = (Report.Engine.PageNo == Report.Engine.TotalPages); // 仅最后一页显示页脚 PageFooter1.Visible =isLastPage; } } }