在线等待!·!·!·如何在一个数据窗口中使用不间断打印
我做了一个数据窗口,要求打印不等长度的数据就是行数不定
要求使用链式纸不间断打印,该如何做,
问题点数:30、回复次数:4Top
1 楼fbc(feng)回复于 2002-09-13 19:23:20 得分 0
为什么没有人里我啊。
我的问题是一个5000行的记录连续打印的问题啊Top
2 楼balloonman2002()回复于 2002-09-13 19:42:59 得分 30
1、在printpage事件中 return 0
2、//====================================================================
// [PUBLIC] Function f_print_continue 在 f_print_continue ( ref powerobject ads_1, integer ai_line ) returns integer
//--------------------------------------------------------------------
// 说明:使用连续纸打印数据窗口,适用于针打,在ESPON LQ300K,LQ1600K上经过测试
//--------------------------------------------------------------------
// 参数:
//
// 参数1:[reference] powerobject ads_1
// 说明:数据窗口或数据存储
// 参数2:[value] integer ai_line
// 说明:数据窗口的题头、页脚行数
//--------------------------------------------------------------------
// 返回: (INTEGER)
//--------------------------------------------------------------------
// 作者: cwl 日期: 2001.08.12
//====================================================================
//返回:是否成功
//例子:f_print_continue(dw_4,6)
long Job
// 打开以个打印作业
Job = PrintOpen()
// 向打印机送 ESC C N 的代码,其中CHAR(27) 代表 ESC char(67) 代表 C ,
//CHAR(N)中的 N 表示页的第一行到末行共 N 行,N 的范围为 1 -- 127 。
PrintSend(Job,char(27) + char(67) + char(ai_line+ads_1.dynamic rowcount( )))
if typeof(ads_1)=datawindow! then
datawindow ldw_1
ldw_1=ads_1
PrintDataWindow ( JOB, ldw_1)
else
datastore lds_1
lds_1=ads_1
PrintDataWindow ( JOB, lds_1)
end if
PrintClose(Job)
return 1
3、如何连续地打印多个数据窗口中的内容?
摘录:http://pbsite.yeah.net
有人问到如何不间断地打印两个数据窗口,即如果第一个数据窗口打印结束后,后面的数据窗口可以接着打印,但是不换页。现提供一种解决方案,供查考,斑竹已经调试成功。
思想:利用组合报表数据窗口(或者数据商店)实现,当用户要求打印时,根据多个数据窗口中的数据窗口对象(dataobject),利用语法动态生成一个组合报表式的数据窗口,然后对该数据窗口进行打印。
具体实现例子:
string ls_syntax
string ls_dw1,ls_dw2
//得到多个数据窗口的数据对象名
ls_dw1 = dw_1.dataobject
ls_dw2 = dw_2.dataobject
ls_syntax = "release 6;~r~n" + &
"datawindow(units=0 timer_interval=0 color=1073741824 processing=5 print.documentname=~"~" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no )~r~n" + &
"summary(height=0 color='536870912' )~r~nfooter(height=0 color='536870912' )~r~n" + &
"detail(height=320 color='536870912' height.autosize=yes)~r~n" + &
"table(column=(type=char(10) updatewhereclause=yes name=a dbname='a' )~r~n" + &
" unbound = 'yes')~r~n" + &
"report(band=detail dataobject='" + ls_dw1 + "' x='46' y='20' height='120' width='2574' border='0' height.autosize=yes criteria='' trail_footer = yes slideup=directlyabove )~r~n" + &
"report(band=detail dataobject='" + ls_dw2 + "' x='41' y='164' height='136' width='2578' border='0' height.autosize=yes criteria='' trail_footer = yes slideleft=yes slideup=directlyabove )~r~n" + &
"htmltable(border='1' cellpadding='0' cellspacing='0' generatecss='no' nowrap='yes')"
//用于打印
ids_print.Create(ls_syntax)
ids_print.settransobject(sqlca)
ids_print.retrieve()
//用于显示效果
dw_3.Create(ls_syntax)
dw_3.settransobject(sqlca)
dw_3.retrieve()
ids_print.print()Top
3 楼fbc(feng)回复于 2002-09-13 20:16:14 得分 0
我马上去试。Top
4 楼fbc(feng)回复于 2002-09-14 18:34:57 得分 0
没有其他的回答了吗Top




