| 注册老失败 |
 |
| 等级:大侠 |
| 权限:普通用户 |
| 积分:85 |
| 金钱:305 |
| 声望:170 |
| 经验:170 |
| 发帖数:170 |
| 注册:2008年10月16日 |
|
|
|
|
问题:
每页打印一定行数后自动分页
方法一:
加一个分页符,在报表的代码界面里面写入以下代码:
以下为引用的内容: 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 |
|
|
|
|
|
|