当前位置:K88软件开发文章中心编程全书编程全书01 → 文章内容

如何在PB程序中为datawindow添加计算域或line

减小字体 增大字体 作者:佚名  来源:翔宇亭IT乐园  发布时间:2019-1-3 0:17:39

:2010-03-25 08:36:00

有时我们在编写PB程序时,需要在datawindow数据窗口中添加一个计算域或者直线,这如何进行呢?

//怎样在程序中为datawindow加计算域或line?
//以下程序加一计算域sum(dept_id for all)
string ls_modrow
dw_1.Modify("DataWindow.summary.Height=64")
ls_modrow = 'Create compute(band=summary font.charset="0" font.face="MS Sans Serif" font.family="2" font.height="-8" font.pitch="2" font.weight="400" background.mode="1" background.color="536870912" color="0" x="9" y="4" height="52" width="297" format="[general]" expression="sum(dept_id for all)" alignment="1" border="0" crosstab.repeat=no )~r~n'
dw_1.modify( ls_modrow )
//以下程序加一条线
string ls_line
dw_1.Modify("DataWindow.detail.Height=332")
ls_line = 'Create line(band=detail background.mode="2" background.color="16777215" pen.style="0" pen.width="5" pen.color="0" x1="37" y1="320" x2="1458" y2="316" )~r~n'
dw_1.modify( ls_line )
dw_1.settransobject(sqlca)
dw_1.retrieve()



如何在PB程序中为datawindow添加计算域或line