1. long ll_dwloop //the datawindow of circle var
long ll_loop
long ll_cloop //need change y pos of column and text
long ll_columnheight //columnheight
long ll_textheight //textheight
long ll_difheight //need change y pos
long ll_columncount //column count
long ll_detailheight //detail band height
long ll_modiloop
string ls_height //set relative column of height
string ls_columntext //set y pos of clolumn of text
string ls_columnname //set y pos of clolumn of name
string ls_return
string ls_editmask //editmask
string ls_coltype
string ls_tmpname //conv columnname
string ls_modistr //modify of string
any la_value //set all type of value to the var
dec{4} lf_convalue //conv decimal value
string ls_convalue //conv string value
boolean lb_noscroll=false //no use set vscroll
boolean lb_error=false
boolean lb_modi = false
is_modichangecolor = string(RGB(il_modichangered,il_modichangegreen,il_modichangeblue)) //modify background color string
ll_textheight=long(is_textheight)
for ll_dwloop= il_oritabcount + 1 to upperbound(idw_dw[])
idw_dw[ll_dwloop].setredraw(false)
ll_difheight=0 //repeate set value
ll_columnheight=0 //repeate set value
ll_detailheight=0 //repeate set value
ll_columncount=long(idw_dw[ll_dwloop].Describe('DataWindow.Column.Count')) //get the current template column count
for ll_loop=1 to ll_columncount
lb_noscroll = false
ls_columnname=idw_dw[ll_dwloop].describe('#'+string(ll_loop)+'.Name') //get column name
ls_coltype=idw_dw[ll_dwloop].describe('#'+string(ll_loop)+'.coltype') //get column type
ls_columntext=ls_columnname+'_t'
la_value = idw_dw[ll_dwloop].object.data[1,ll_loop] //get value
//-------------------------------------------------------------------------------------------------------------
lb_modi = false //repeate set value
//set already modify backcolor
for ll_modiloop = 1 to upperbound(is_modichangefield)
if upper(trim(ls_columnname)) = is_modichangefield[ll_modiloop] then
lb_modi = true
exit
end if
next
if lb_modi = true then
ls_modistr = "#"+string(ll_loop)+".background.color='"+is_modichangecolor+"'"
ls_return = idw_dw[ll_dwloop].modify(ls_modistr)
if len(ls_return) > 0 then
lb_error=true
exit
end if
end if
//-------------------------------------------------------------------------------------------------------------
//get the current column should was setted column height
ll_columnheight=(ceiling(len(trim(string(la_value)))/long(is_Columncharactercount)))*long(is_columnheight)
if isnull(ll_columnheight) or ll_columnheight=0 or ll_columnheight <= long(is_columnheight) then
ll_columnheight=long(is_columnheight)
lb_noscroll = true
end if
//get the below column and text should move y pos of count.
ll_difheight=ll_difheight+ll_columnheight -long(is_columnheight)
ls_return=idw_dw[ll_dwloop].modify(ls_columnname + ".height ='" + &
string(ll_columnheight)+"'") //set column of height
if len(ls_return) > 0 then
lb_error=true
exit
end if
//if the column of value is too much set the column set vscroll bar
if lb_noscroll = true then
ls_return=idw_dw[ll_dwloop].modify(ls_columnname + ".Edit.VScrollBar =no") //set column of height
if len(ls_return) > 0 then
lb_error=true
exit
end if
elseif lb_noscroll = false then
ls_return=idw_dw[ll_dwloop].modify(ls_columnname + ".Edit.VScrollBar =yes") //set column of height
if len(ls_return) > 0 then
lb_error=true
exit
end if
end if