热情软件屋

 

如何把动态创建的数据窗口的内容传到composite类型的数据窗口


编号:QA002996
建立日期: 2000年5月30日 最后修改日期:2000年5月30日
所属类别:

鲁强:
    操作系统:win98
    编程工具:pb6.5
    问题:如何将把动态创建的数据窗口的内容传到composite类型的数据窗口的报表控件里?

回答:

    请参考以下代码:
    利用语法动态生成一个组合报表式的数据窗口,然后对该数据窗口进行打印。
     具体实现例子:
    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()

此问题由阿乌回答。

 
把这个问题推荐给朋友
   
   
您的意见类别
您的名字
您的电子邮件
您的建议(请尽可能详细)
 
 

版权所有 1997-2008 热情软件屋
如果您有任何建议和意见, 请给我发个电子邮件 askpro@china-askpro.com
Web Designed by ZebraStudio