关于合并数据窗口的问题(在线等待)

lutter 2003-04-17 02:40:38
我有两个数据窗口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中输入什么数据就显示什么数据。
要不要在上面添加什么代码,请高人指示。
...全文
92 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
byfq 2003-04-18
  • 打赏
  • 举报
回复
当成datawindowchild进行处理就行了
lutter 2003-04-17
  • 打赏
  • 举报
回复
而且,这个report,能不能设定动态的设定检索的数据。
就是利用setfilter(),我不太清楚完整的语句应该怎么写,
只知道用这个函数!
lutter 2003-04-17
  • 打赏
  • 举报
回复
我试试!
另外请问这个report所放的位置,能否设定?
xirumin 2003-04-17
  • 打赏
  • 举报
回复
学习来了
wu_07 2003-04-17
  • 打赏
  • 举报
回复
不用两个都创建,在其中一个创建一个report就可以了

ls_syntax='create report(band=detail .........)'

dw_2.modify(ls_syntax)

611

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder DataWindow
社区管理员
  • DataWindow社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧