问题:
每页打印一定行数后自动分页
方法一:
加一个分页符,在报表的代码界面里面写入以下代码:
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技术专栏