w_rpt_groupd.srw 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. $PBExportHeader$w_rpt_groupd.srw
  2. $PBExportComments$删除分组--窗口
  3. forward
  4. global type w_rpt_groupd from Window
  5. end type
  6. type cb_2 from commandbutton within w_rpt_groupd
  7. end type
  8. type cb_1 from commandbutton within w_rpt_groupd
  9. end type
  10. type dw1 from datawindow within w_rpt_groupd
  11. end type
  12. end forward
  13. global type w_rpt_groupd from Window
  14. int X=841
  15. int Y=524
  16. int Width=1170
  17. int Height=1240
  18. boolean TitleBar=true
  19. string Title="删除分组"
  20. long BackColor=12632256
  21. boolean ControlMenu=true
  22. WindowType WindowType=response!
  23. cb_2 cb_2
  24. cb_1 cb_1
  25. dw1 dw1
  26. end type
  27. global w_rpt_groupd w_rpt_groupd
  28. type variables
  29. int i,iis,ii_row
  30. string is_temp
  31. end variables
  32. on w_rpt_groupd.create
  33. this.cb_2=create cb_2
  34. this.cb_1=create cb_1
  35. this.dw1=create dw1
  36. this.Control[]={this.cb_2,&
  37. this.cb_1,&
  38. this.dw1}
  39. end on
  40. on w_rpt_groupd.destroy
  41. destroy(this.cb_2)
  42. destroy(this.cb_1)
  43. destroy(this.dw1)
  44. end on
  45. event open;f_wcenter(this)
  46. dw1.modify("ctag_t.text='分组表达式'")
  47. iis=w_rpt_main.iis
  48. for i=1 to iis
  49. is_temp=w_rpt_main.io[i].oname
  50. if pos(is_temp,'band_g_h_')=1 then
  51. ii_row=dw1.insertrow(0)
  52. dw1.setitem(ii_row,'cname',is_temp)
  53. is_temp=w_rpt_main.io[i].otext
  54. is_temp=f_replace(is_temp,'▲组标题区','分组')
  55. dw1.setitem(ii_row,'ctag',is_temp)
  56. end if
  57. next
  58. end event
  59. type cb_2 from commandbutton within w_rpt_groupd
  60. int X=663
  61. int Y=1016
  62. int Width=247
  63. int Height=108
  64. int TabOrder=20
  65. string Text="取消"
  66. int TextSize=-9
  67. int Weight=400
  68. string FaceName="宋体"
  69. FontPitch FontPitch=Variable!
  70. end type
  71. event clicked;close(parent)
  72. end event
  73. type cb_1 from commandbutton within w_rpt_groupd
  74. int X=233
  75. int Y=1016
  76. int Width=247
  77. int Height=108
  78. int TabOrder=10
  79. string Text="确认"
  80. int TextSize=-9
  81. int Weight=400
  82. string FaceName="宋体"
  83. FontPitch FontPitch=Variable!
  84. end type
  85. event clicked;is_temp=''
  86. ii_row=dw1.GetSelectedRow(0)
  87. if ii_row>0 then
  88. is_temp=dw1.getitemstring(ii_row,'cname')
  89. end if
  90. closewithreturn(parent,is_temp)
  91. end event
  92. type dw1 from datawindow within w_rpt_groupd
  93. int X=73
  94. int Y=12
  95. int Width=997
  96. int Height=976
  97. int TabOrder=30
  98. string DataObject="dw_rpt_column"
  99. BorderStyle BorderStyle=StyleLowered!
  100. boolean VScrollBar=true
  101. boolean LiveScroll=true
  102. end type
  103. event clicked;ii_row=dw1.getselectedrow(0)
  104. if ii_row>0 then
  105. dw1.selectrow(ii_row,false)
  106. end if
  107. if row>0 then
  108. dw1.selectrow(row,true)
  109. end if
  110. end event