option compare database dim row as long dim rowsinpage as integer private sub 主体_format(cancel as integer, formatcount as integer) rowsinpage = 7 row = row + 1 if row >= rowsinpage then me.pagebreak18.visible = true row = -1 else me.pagebreak18.visible = false end if end sub
方法二:
在报表的代码界面里面写入以下代码:
option compare database dim row as long private sub 主体_format(cancel as integer, formatcount as integer) row = row + 1 if me.section(acdetail).forcenewpage = 1 then me.section(acdetail).forcenewpage = 0 else if row mod 7 = 0 then me.section(acdetail).forcenewpage = 1 row = 0 end if end if end sub