Home > Database > Mysql Tutorial > body text

Access报表打印如何自动分页

WBOY
Release: 2016-06-07 15:16:29
Original
2296 people have browsed it

问题: 每页 打印 一定行数后 自动 分页 方法一: 加一个分页符,在 报表 的代码界面里面写入以下代码: OptionCompareDatabase DimrowAsLong DimRowsInPageAsInteger PrivateSub主体_Format(CancelAsInteger,FormatCountAsInteger) RowsInPage=7 row=row+1

问题:

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

方法一:

加一个分页符,在报表的代码界面里面写入以下代码:

OptionCompareDatabase<br> DimrowAsLong<br> DimRowsInPageAsInteger<br> PrivateSub主体_Format(CancelAsInteger,FormatCountAsInteger)<br>   RowsInPage=7<br>   row=row+1<br>   Ifrow>=RowsInPageThen<br>     Me.PageBreak18.Visible=True<br>     row=-1<br>   Else<br>     Me.PageBreak18.Visible=False<br>   EndIf<br> EndSub

方法二:

报表的代码界面里面写入以下代码:

OptionCompareDatabase<br> DimrowAsLong<br> PrivateSub主体_Format(CancelAsInteger,FormatCountAsInteger)<br>   row=row+1<br>   IfMe.Section(acDetail).ForceNewPage=1Then<br>     Me.Section(acDetail).ForceNewPage=0<br>   Else<br>     IfrowMod7=0Then<br>       Me.Section(acDetail).ForceNewPage=1<br>       row=0<br>     EndIf<br>   EndIf<br> EndSub

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!