[原创]报表打印
在一个应用系统中,报表打印是非常重要的,也是比较复杂的.下面我给出一个比较简单的报表打印代码.
***** “预览报表”按钮Click事件
report form &tmb preview && tmb保存报表名变量
report form &tmb nocons environment &&计算报表的总页数
nTotalPAGEs=_pageno &&报表的总页数
thisform.spinner1.keyboardhighvalue=nTotalPAGEs &&第 页到第 页
thisform.spinner1.spinnerhighvalue=nTotalPAGEs &&打印页数控制
thisform.spinner2.keyboardhighvalue=nTotalPAGEs
thisform.spinner2.spinnerhighvalue=nTotalPAGEs
thisform.spinner2.value=nTotalPAGEs
***** “打印报表”按钮Click事件
REPORT FORM &tmb RANGE thisform.spinner1.value,thisform.spinner2.value TO PRINTER
***** “打印设置”按钮Click事件
Sys(1037)