w_publ_preview_mdfcrptxwidth.srw 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. $PBExportHeader$w_publ_preview_mdfcrptxwidth.srw
  2. forward
  3. global type w_publ_preview_mdfcrptxwidth from w_publ_base
  4. end type
  5. type cb_reset from uo_imflatbutton within w_publ_preview_mdfcrptxwidth
  6. end type
  7. type cb_2 from uo_imflatbutton within w_publ_preview_mdfcrptxwidth
  8. end type
  9. type cb_ok from uo_imflatbutton within w_publ_preview_mdfcrptxwidth
  10. end type
  11. type cb_yy from uo_imflatbutton within w_publ_preview_mdfcrptxwidth
  12. end type
  13. type dw_1 from u_dw_rbtnfilter within w_publ_preview_mdfcrptxwidth
  14. end type
  15. end forward
  16. global type w_publ_preview_mdfcrptxwidth from w_publ_base
  17. integer x = 46
  18. integer y = 272
  19. integer width = 3611
  20. integer height = 1660
  21. string title = "明细网格列序列宽调整"
  22. boolean minbox = false
  23. windowtype windowtype = response!
  24. long backcolor = 80269524
  25. cb_reset cb_reset
  26. cb_2 cb_2
  27. cb_ok cb_ok
  28. cb_yy cb_yy
  29. dw_1 dw_1
  30. end type
  31. global w_publ_preview_mdfcrptxwidth w_publ_preview_mdfcrptxwidth
  32. type variables
  33. s_childreportxwidth s_xwidth
  34. s_mdfxwidth_tran s_mdfxw_tran
  35. datastore ds_dt
  36. end variables
  37. forward prototypes
  38. public function integer wf_ok ()
  39. public subroutine wf_retrieve ()
  40. end prototypes
  41. public function integer wf_ok ();int ls_i,ls_clmno
  42. ls_clmno=integer(dw_1.Describe('DataWindow.Column.Count'))
  43. for ls_i=1 to ls_clmno
  44. s_xwidth.width[ls_i]=integer( dw_1.Describe('#'+string(ls_i)+'.width'))
  45. s_xwidth.x[ls_i]=integer( dw_1.Describe('#'+string(ls_i)+'.x'))
  46. next
  47. s_xwidth.p=ls_clmno
  48. if dw_1.Describe('cmpl1.name')='cmpl1' then
  49. s_xwidth.cmplwidth[1]=integer( dw_1.Describe('cmpl1.width'))
  50. s_xwidth.cmplx[1]=integer( dw_1.Describe('cmpl1.x'))
  51. s_xwidth.cmplp=1
  52. end if
  53. if dw_1.Describe('cmpl2.name')='cmpl2' then
  54. s_xwidth.cmplwidth[2]=integer( dw_1.Describe('cmpl2.width'))
  55. s_xwidth.cmplx[2]=integer( dw_1.Describe('cmpl2.x'))
  56. s_xwidth.cmplp=s_xwidth.cmplp+2
  57. end if
  58. if dw_1.Describe('cmpl3.name')='cmpl3' then
  59. s_xwidth.cmplwidth[3]=integer( dw_1.Describe('cmpl3.width'))
  60. s_xwidth.cmplx[3]=integer( dw_1.Describe('cmpl3.x'))
  61. s_xwidth.cmplp=s_xwidth.cmplp+4
  62. end if
  63. return 0
  64. end function
  65. public subroutine wf_retrieve ();dw_1.dataobject=s_mdfxw_tran.dataobject
  66. dw_1.settransobject(sqlca)
  67. choose case s_mdfxw_tran.retrievetype
  68. case 1
  69. dw_1.retrieve(s_mdfxw_tran.retrievestr)
  70. case 2
  71. dw_1.retrieve(s_mdfxw_tran.retrieveid)
  72. case 5
  73. dw_1.retrieve(s_mdfxw_tran.retrieveid,s_mdfxw_tran.secondretrieveid)
  74. case 14
  75. dw_1.retrieve(s_mdfxw_tran.retrieveid,s_mdfxw_tran.retrievestr)
  76. end choose
  77. //string new_sqlstr
  78. //long pos_dot1,pos_dot2
  79. //new_sqlstr=dw_1.Describe("DataWindow.Table.Select")
  80. //pos_dot1=pos(new_sqlstr,':',1)
  81. //pos_dot2=pos(new_sqlstr,':',pos_dot1 + 1)
  82. //
  83. //if pos_dot2=0 then
  84. // dw_1.retrieve(s_mdfxw_tran.retrieveid)
  85. //else
  86. // dw_1.retrieve(s_mdfxw_tran.retrieveid,s_mdfxw_tran.secondretrieveid)
  87. //end if
  88. dw_1.object.DataWindow.Print.Preview = 'yes'
  89. end subroutine
  90. on w_publ_preview_mdfcrptxwidth.create
  91. int iCurrent
  92. call super::create
  93. this.cb_reset=create cb_reset
  94. this.cb_2=create cb_2
  95. this.cb_ok=create cb_ok
  96. this.cb_yy=create cb_yy
  97. this.dw_1=create dw_1
  98. iCurrent=UpperBound(this.Control)
  99. this.Control[iCurrent+1]=this.cb_reset
  100. this.Control[iCurrent+2]=this.cb_2
  101. this.Control[iCurrent+3]=this.cb_ok
  102. this.Control[iCurrent+4]=this.cb_yy
  103. this.Control[iCurrent+5]=this.dw_1
  104. end on
  105. on w_publ_preview_mdfcrptxwidth.destroy
  106. call super::destroy
  107. destroy(this.cb_reset)
  108. destroy(this.cb_2)
  109. destroy(this.cb_ok)
  110. destroy(this.cb_yy)
  111. destroy(this.dw_1)
  112. end on
  113. event open;call super::open;ds_dt = CREATE datastore
  114. s_xwidth.p = 0
  115. s_mdfxw_tran = Message.PowerObjectParm
  116. IF s_mdfxw_tran.retrieveid = 0 and s_mdfxw_tran.retrievestr = '' OR Trim(s_mdfxw_tran.DataObject) = '' THEN
  117. Close(THIS)
  118. RETURN
  119. END IF
  120. wf_retrieve()
  121. //ds_dt.dataobject=s_mdfxw_tran.dataobject
  122. //ds_dt.settransobject(sqlca)
  123. //ds_dt.retrieve(s_mdfxw_tran.retrieveid)
  124. //
  125. //dw_1.dataobject=s_mdfxw_tran.dataobject
  126. //dw_1.settransobject(sqlca)
  127. //dw_1.retrieve(s_mdfxw_tran.retrieveid)
  128. //
  129. ////ds_dt.sharedata(dw_1)
  130. //
  131. //dw_1.object.DataWindow.Print.Preview = 'yes'
  132. end event
  133. event close;closewithreturn(this, s_xwidth)
  134. end event
  135. type cb_func from w_publ_base`cb_func within w_publ_preview_mdfcrptxwidth
  136. boolean visible = false
  137. integer x = 2048
  138. integer y = 1408
  139. integer width = 338
  140. boolean enabled = false
  141. end type
  142. type cb_exit from w_publ_base`cb_exit within w_publ_preview_mdfcrptxwidth
  143. integer x = 2825
  144. integer y = 1408
  145. integer width = 338
  146. string text = "取消"
  147. end type
  148. type cb_reset from uo_imflatbutton within w_publ_preview_mdfcrptxwidth
  149. integer x = 288
  150. integer y = 1408
  151. integer width = 270
  152. integer height = 96
  153. integer taborder = 50
  154. string text = "重置"
  155. end type
  156. event clicked;call super::clicked;wf_retrieve()
  157. //dw_1.dataobject=s_mdfxw_tran.dataobject
  158. //dw_1.settransobject(sqlca)
  159. //dw_1.retrieve(s_mdfxw_tran.retrieveid)
  160. ////ds_dt.sharedata(dw_1)
  161. //dw_1.object.DataWindow.Print.Preview = 'yes'
  162. end event
  163. type cb_2 from uo_imflatbutton within w_publ_preview_mdfcrptxwidth
  164. integer x = 5
  165. integer y = 1408
  166. integer width = 270
  167. integer height = 96
  168. integer taborder = 60
  169. string text = "数据发送"
  170. end type
  171. event clicked;call super::clicked;OPENWITHPARM(w_sentdataout,dw_1)
  172. end event
  173. type cb_ok from uo_imflatbutton within w_publ_preview_mdfcrptxwidth
  174. integer x = 2464
  175. integer y = 1408
  176. integer width = 338
  177. integer height = 96
  178. integer taborder = 50
  179. boolean default = true
  180. end type
  181. event clicked;call super::clicked;wf_ok()
  182. close(parent)
  183. end event
  184. type cb_yy from uo_imflatbutton within w_publ_preview_mdfcrptxwidth
  185. integer x = 3186
  186. integer y = 1408
  187. integer width = 338
  188. integer height = 96
  189. integer taborder = 30
  190. string text = "应用"
  191. end type
  192. event clicked;call super::clicked;
  193. if not isvalid(w_publ_preview) then return
  194. wf_ok()
  195. w_publ_preview.wf_mdfmxreport(s_xwidth)
  196. end event
  197. type dw_1 from u_dw_rbtnfilter within w_publ_preview_mdfcrptxwidth
  198. integer width = 3557
  199. integer height = 1388
  200. integer taborder = 50
  201. boolean bringtotop = true
  202. boolean hscrollbar = true
  203. boolean vscrollbar = true
  204. end type
  205. event constructor;call super::constructor;titleclick_sort_use=true //单击标题排序功能开关
  206. end event