Access编程交流网
  • 设为首页|收藏本站|繁体中文|手机版
  •     
  • Access培训-Access开发平台-Access行业开发

  • 首页
  • 资讯
  • 技巧
  • 源码
  • 行业
  • 资源
  • 活动
  • 关于

技巧

ACCESS数据库

启动/设置/选项/背景

修复/压缩

安全/加密/解密

快捷键

版本升级/其它等

数据表

命名方式/设计规范

表设计

查询

Sql语言基础

选择查询

更新查询

删除查询

追加查询

生成表查询

交叉表查询

SQL特定查询

查询参数

查询综合应用

界面/窗体/控件

标签

文本框

命令按钮

组合框/列表框

选项组/复选框/选项按钮

选项卡

子窗体

窗体本身/综合应用

其它

报表打印

报表设计

高级报表

模块/函数/VBA/API/系统

VBA基础

内置函数

调试/跟踪/Debug

模块/类模块

API/COM/系统相关

字符数字日期

网络通信游戏

加密解密安全

文件处理

经典算法

宏/菜单/工具栏/功能区

宏/脚本

菜单/工具栏

功能区/Ribbon

图表/图形/图像/多媒体

图表

图形/图像

音频

视频/动画

DAO/链接表/ADO/ADP

DAO/链接表/ODBC

ADO/RDO

ADP

ActiveX/第三方控件/插件

Treeview树控件

ListView列表控件

Toolbar工具栏控件

微软其它控件

Dbi-Tech

CodeJock

Grid++Report

FastReport

ComponentOne

加载项/插件/Addin

OFFICE集成/导入导出/交互

Excel导入导出/交互

Word导入导出/交互

PPT交互

Outlook控制/邮件

Text文本文件/INI/CSV

PDF/SWF/XML格式

CAD格式

Sharepoint/其它Office

SqlServer/其它数据库

表

视图

存储过程/触发器

函数

用户/权限/安全

调试/维护

SqlServer其它/综合

发布/打包/文档/帮助

开发版/运行时

打包/发布/部署

开发文档/帮助制作

Access完整行业系统

采购管理系统

销售管理系统

仓库管理系统

人力资源管理HRM

CRM管理系统

MRP/ERP管理系统

BRP/流程优化

其它管理系统

心得/经验/绝招
其它/杂项
Excel技巧

Excel应用与操作

Excel开发编程

Word技巧

Word应用与操作

Word开发编程

Outlook技巧

Outlook应用与操作

Outlook开发编程

热门文章

  • 在Access中使用自动化..
  • 如何控制每页打印的记录数?
  • 报表奇偶分页打印
  • Access报表文本框按字..
  • ACCESS数据库中的中文..
  • [原创]在 Access ..

最新文章

  • Access中窗体或者报表..
  • Access报表文本框按字..
  • Access报表打印设置
  • Access报表补空行代码
  • 懒人有懒计——浅谈自动报表
  • Access使用excel..

联系方式

Access交流网(免费Access交流)

QQ:18449932 

网  址:www.access-cn.com

当前位置:首页 > 技巧 > 报表打印
报表打印

报表中遇到不满一页如何用空行代替

 

 

请参考下载区例程:

报表记录不满一页用空行代替


ACC: Print Blank Line Every Nth Line in a Report (95/97)
The information in this article applies to:
Microsoft access for Windows 95 7.0
Microsoft access 97

This article was previously published under Q139046 
SUMMARY
Moderate: Requires basic macro, coding, and interoperability skills. 

This article describes how to add blank lines between the printed lines on a report. You can use this method to add a blank line after a set number of lines. For example, you could use this method to add a blank line after every five lines of data in your report. 

NOTE: This article explains a technique demonstrated in the sample files, RptSampl.exe (for Microsoft Access for Windows 95 version 7.0) and RptSmp97.exe (for Microsoft access 97). For information about how to obtain these sample files, please see the following articles in the Microsoft Knowledge Base: 

145777 ACC95: Microsoft access Sample Reports Available in Download Center 

175072 ACC97: Microsoft access 97 Sample Reports Available in Download Center 
MORE INFORMATION
CAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and perform these steps on a copy of the database. 

To add a blank line after every five lines in a report, follow these steps: 

Open the sample database Northwind.mdb. Click the Reports tab, and then click New. 
In the New Report dialog box, click Report Wizard, choose the Employees Table, and then click OK. 
In the Available Fields box, select EmployeeID, and then click the ">" button. Repeat this step for the LastName, FirstName, and BirthDate fields, and then click Next. 
Select BirthDate as the primary group level, click the ">" button, and then click Next. 
Select LastName as the field to establish sort order in Field 1, and then click Next. 
On the "How would you like to lay out your report" screen, click Next. 
On the "What Style would you like?" screen, click Next. 
On the "What Title would you like for your report?" screen, type Employee Birthdays, and then click Finish. 
View the new report in Design view. 
On the View menu, click Code. 
Type the following lines in the module's Declarations section: 


       Option Compare Database
       ' This code declares the cLines variable as an integer, and the
       ' cMaxLine constant as five. You can set the cMaxLine constant
       ' to insert a blank line after as many lines as you want. For
       ' example, to add a blank line after every eight lines in the
       ' report, set cMaxLine=8.
       Dim cLines As Integer
       Const cMaxLine=5

                        
In the Object box of the code module, select Report. In the Procedure box of the code module, select Open. Type the following procedure: 

       Private Sub Report_Open (Cancel As Integer)
          'This code initializes the cLines variable to zero.
          cLines = 0
       End Sub


                        
In the Object box, select Detail. The Procedure box will change to Format. Type the following procedure: 

       Private Sub Detail_Format (Cancel As Integer, FormatCount As _
              Integer)
       ' This code adds a blank line by setting the NextRecord and
       ' PrintSection properties.
         If cLines Mod (cMaxLine+1) = 0 Then
            Me.NextRecord = False
            Me.PrintSection = False
         End If
         cLines = cLines + 1
       End Sub

                        
Close the module, and then preview the report. Note that there is a blank line in the report after every five lines of detail. 
REFERENCES
For more information about the NextRecord or PrintSection properties, search for "NextRecord," and then "NextRecord property" using the Microsoft access 97 Help Index. 
Last Reviewed: 11/17/2000 
Keywords: kbhowto KB139046 

 


http://support.microsoft.com/default.aspx?scid=kb;en-us;139046

 

 

 

 

 

录入:changechange(CSDN)   责任编辑:cg1

 

发布人:ec-ACCESS911  
分享到:
点击次数:  更新时间:2003-12-06 23:51:09  【打印此页】  【关闭】
上一条:创建完美报表  下一条:获取打印机纸张信息



相关文章

  • • Access中窗体或者报表页眉和页面页眉的区别,窗体页脚和页面页脚的区别
  • • Access报表文本框按字数同步缩放
  • • Access报表打印设置
  • • Access报表补空行代码
  • • 懒人有懒计——浅谈自动报表
  • • Access使用excel输出复杂报表
  • • 报表每页打印到一定行数自动分页
  • • 解决Access在页面设置中设置边距无法保存的问题

热门文章

  • [2005-02-04] 如何在报表中产生递增的顺序编号access数据库
  • [2003-12-06] 打印再添一例,自动分页access数据库
  • [2003-12-06] 报表中遇到不满一页如何用空行代替access数据库
  • [2006-10-26] 每页打印一定行数后自动分页(报表分页)access数据库
  • [2017-06-15] Access报表打印设置access数据库
  • [2017-07-22] Access报表文本框按字数同步缩放access数据库

热门产品

公司动态|在线留言|在线反馈|友情链接|会员中心|站内搜索|网站地图

中山市天鸣科技发展有限公司 版权所有 1999-2023 粤ICP备10043721号

QQ:18449932

Access应用 Access培训 Access开发 Access平台

access|数据库|access下载|access教程|access视频|access软件

Powered by MetInfo 5.3.12 ©2008-2025  www.metinfo.cn