首先,挂上PrintSheet事件,例如:- protected override void OnInit(EventArgs e)
- {
- base.OnInit(e);
- this.FpSpread1.PrintSheet += new PrintEventHandler(FpSpread1_PrintSheet);
- }
复制代码 然后,在事件的处理方法中,写入插入分页的逻辑。以10行分一页为例:- void FpSpread1_PrintSheet(object sender, PrintEventArgs e)
- {
- if ((e.Row + 1) % 10 == 0)
- {
- e.PageBreak = true;
- }
- }
复制代码 |