首页 > 开发 > 综合 > 正文

打印再添一例,自动分页

2024-07-21 02:12:27
字体:
来源:转载
供稿:网友

问题:

每页打印一定行数后自动分页

方法一:

加一个分页符,在报表的代码界面里面写入以下代码:
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

例子下载:
http://access911.net/down/forcenewpage.rar

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表