关于合并数据窗口的问题(在线等待)
我有两个数据窗口dw1,dw2,现在想动态的生成一个合并的数据窗口。
生成动态数据窗口的语句如下:
string str_syntax,str_dw1,str_dw2
//得到数据窗口的数据对象名称
str_dw1 = dw_1.dataobject
str_dw2 = dw_2.dataobject
str_syntax="release 8;~r~n" +&
"datawindow(units=0 timer_interval=0 color=1073741824 processing=5 HTMLDW=no 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" +&
"header(height=136 color='536870912' )~r~n" +&
"summary(height=0 color='536870912' )~r~n" +&
"footer(height=0 color='536870912' )~r~n" +&
"detail(height=360 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='"+str_dw1+"' x='46' y='20' height='120' width='1417' border='0' height.autosize=yes criteria='' trail_footer = yes name=dw_1 visible='1' slideleft=yes slideup=directlyabove )~r~n" +&
"report(band=detail dataobject='"+str_dw2+"' x='50' y='224' height='120' width='1413' border='0' height.autosize=yes criteria='' trail_footer = yes name=dw_2 visible='1' slideleft=yes slideup=directlyabove )~r~n" +&
"text(band=header alignment='0' text='二个报表合并打印' border='0' color='255' x='485' y='32' height='56' width='731' html.valueishtml='0' name=t_1 visible='1' font.face='宋体' font.height='-9' font.weight='700' font.family='0' font.pitch='2' font.charset='134' font.underline='1' background.mode='2' background.color='1073741824' )~r~n" +&
"htmltable(border='1' )~r~n" +&
"htmlgen(clientevents='1' clientvalidation='1' clientcomputedfields='1' clientformatting='0' clientscriptable='0' generatejavascript='1' netscapelayers='0' )"
dw_3.Create(str_syntax)
dw_3.settransobject(sqlca)
dw_3.retrieve()
请问我动态生成的数据窗口,能不能不从dw1,dw2的数据库中取数据,而是我在dw1和dw2中输入什么数据就显示什么数据。
要不要在上面添加什么代码,请高人指示。