問題:
每頁打印一定行數(shù)后自動分頁
方法一:
加一個分頁符,在報表的代碼界面里面寫入以下代碼:
optioncomparedatabase
dimrowaslong
dimrowsinpageasinteger
privatesub主體_format(cancelasinteger,formatcountasinteger)
rowsinpage=7
row=row+1
ifrow>=rowsinpagethen
me.pagebreak18.visible=true
row=-1
else
me.pagebreak18.visible=false
endif
endsub
方法二:
在報表的代碼界面里面寫入以下代碼:
optioncomparedatabase
dimrowaslong
privatesub主體_format(cancelasinteger,formatcountasinteger)
row=row+1
ifme.section(acdetail).forcenewpage=1then
me.section(acdetail).forcenewpage=0
else
ifrowmod7=0then
me.section(acdetail).forcenewpage=1
row=0
endif
endif
endsub
更多信息請查看IT技術(shù)專欄