$PBExportHeader$w_publ_easyq.srw $PBExportComments$报表窗口 forward global type w_publ_easyq from w_publ_base end type type cb_2 from uo_imflatbutton within w_publ_easyq end type type cb_psetup from uo_imflatbutton within w_publ_easyq end type type cb_1 from uo_imflatbutton within w_publ_easyq end type type st_3 from statictext within w_publ_easyq end type type st_4 from statictext within w_publ_easyq end type type em_1 from editmask within w_publ_easyq end type type em_2 from editmask within w_publ_easyq end type type ddlb_yl from dropdownlistbox within w_publ_easyq end type type cbx_yl from checkbox within w_publ_easyq end type type dw_1 from u_dw_rbtnfilter within w_publ_easyq end type type sle_mtrl from singlelineedit within w_publ_easyq end type type sle_cust from singlelineedit within w_publ_easyq end type type st_mtrl from statictext within w_publ_easyq end type type st_cust from statictext within w_publ_easyq end type type cbx_loginretr from checkbox within w_publ_easyq end type type pb_em1 from picturebutton within w_publ_easyq end type type pb_em2 from picturebutton within w_publ_easyq end type type pb_2 from picturebutton within w_publ_easyq end type type cb_help from uo_imflatbutton within w_publ_easyq end type type cb_copyself from uo_imflatbutton within w_publ_easyq end type type gb_1 from groupbox within w_publ_easyq end type type ln_bar from line within w_publ_easyq end type type ln_bar2 from line within w_publ_easyq end type type r_bar from rectangle within w_publ_easyq end type type ln_1 from line within w_publ_easyq end type type ln_2 from line within w_publ_easyq end type type ln_3 from line within w_publ_easyq end type type ln_4 from line within w_publ_easyq end type end forward global type w_publ_easyq from w_publ_base integer x = 270 integer y = 136 integer width = 3639 integer height = 2404 string title = "统计表" boolean maxbox = true boolean resizable = true windowstate windowstate = maximized! boolean if_ue_retr = true boolean if_ue_filter = true boolean if_ue_sort = true boolean if_ue_sentdataout = true event ue_date1 ( ) event ue_date2 ( ) event ue_date3 ( ) event ue_help ( ) event user_key ( ) event ue_date4 ( ) event ue_before_openretrieve ( ) cb_2 cb_2 cb_psetup cb_psetup cb_1 cb_1 st_3 st_3 st_4 st_4 em_1 em_1 em_2 em_2 ddlb_yl ddlb_yl cbx_yl cbx_yl dw_1 dw_1 sle_mtrl sle_mtrl sle_cust sle_cust st_mtrl st_mtrl st_cust st_cust cbx_loginretr cbx_loginretr pb_em1 pb_em1 pb_em2 pb_em2 pb_2 pb_2 cb_help cb_help cb_copyself cb_copyself gb_1 gb_1 ln_bar ln_bar ln_bar2 ln_bar2 r_bar r_bar ln_1 ln_1 ln_2 ln_2 ln_3 ln_3 ln_4 ln_4 end type global w_publ_easyq w_publ_easyq type variables Boolean if_mdf_title = TRUE Boolean cb_reol Boolean if_retrieveing = FALSE //是否正在retrieve String cur_vspos Boolean if_power_sendout = true Boolean if_power_print = true end variables forward prototypes public function integer days_in_month (integer month, integer year) public function integer wf_replacedw () public subroutine wf_hidecol () public subroutine wf_init_dw1 () end prototypes event ue_date1();//IF THIS.Text = "本日" THEN em_1.text = string(today(),"yyyy-mm-dd") em_2.text = string(today(),"yyyy-mm-dd") //ELSEIF THIS.Text = "本周" THEN // int li_DayNum // li_DayNum = DayNumber(today()) // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd") // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd") //ELSEIF THIS.Text = "本月" THEN // int li_Month, li_Year, li_Days // li_Month = Month(today()) // li_Year = Year(today()) // li_Days = days_in_month(li_Month, li_Year) // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd") // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd") //END IF end event event ue_date2();//IF THIS.Text = "本日" THEN // em_1.text = string(today(),"yyyy-mm-dd") // em_2.text = string(today(),"yyyy-mm-dd") //ELSEIF THIS.Text = "本周" THEN int li_DayNum li_DayNum = DayNumber(today()) em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd") em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd") //ELSEIF THIS.Text = "本月" THEN // int li_Month, li_Year, li_Days // li_Month = Month(today()) // li_Year = Year(today()) // li_Days = days_in_month(li_Month, li_Year) // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd") // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd") //END IF end event event ue_date3();//IF THIS.Text = "本日" THEN // em_1.text = string(today(),"yyyy-mm-dd") // em_2.text = string(today(),"yyyy-mm-dd") //ELSEIF THIS.Text = "本周" THEN // int li_DayNum // li_DayNum = DayNumber(today()) // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd") // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd") //ELSEIF THIS.Text = "本月" THEN int li_Month, li_Year, li_Days li_Month = Month(today()) li_Year = Year(today()) li_Days = days_in_month(li_Month, li_Year) em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd") em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd") //END IF end event event ue_help();Int i i = htmlhelpA(Handle(THIS), sys_help_chm, 0, THIS.Title+".html") end event event user_key();IF KeyDown(KeyF1!) THEN THIS.TriggerEvent('ue_help') end if end event event ue_date4();//IF THIS.Text = "本日" THEN // em_1.text = string(today(),"yyyy-mm-dd") // em_2.text = string(today(),"yyyy-mm-dd") //ELSEIF THIS.Text = "本周" THEN // int li_DayNum // li_DayNum = DayNumber(today()) // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd") // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd") //ELSEIF THIS.Text = "本月" THEN Int li_Month, li_Year, li_Days li_Month = Month(Today()) li_Year = Year(Today()) IF li_Month = 1 THEN li_Month = 12 li_Year = li_Year - 1 ELSE li_Month -= 1 END IF li_Days = days_in_month(li_Month, li_Year) em_1.Text = String(Date(li_Year, li_Month, 1),"yyyy-mm-dd") em_2.Text = String(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd") //END IF end event event ue_before_openretrieve();EM_1.Text = String(Today(),'YYYY-MM-01') EM_2.Text = String(Today(),'YYYY-MM-DD') end event public function integer days_in_month (integer month, integer year);//Most cases are straight forward in that there are a fixed number of //days in 11 of the 12 months. February is, of course, the problem. //In a leap year February has 29 days, otherwise 28. Integer li_DaysInMonth, li_Days[12] = {31,28,31,30,31,30,31,31,30,31,30,31} // Get the number of days per month for a non leap year. li_DaysInMonth = li_Days[Month] // Check for a leap year. If Month = 2 Then // If the year is a leap year, change the number of days. // Leap Year Calculation: // Year divisible by 4, but not by 100, unless it is also divisible by 400 If ( (Mod(Year,4) = 0 And Mod(Year,100) <> 0) Or (Mod(Year,400) = 0) ) Then li_DaysInMonth = 29 End If End If //Return the number of days in the relevant month Return li_DaysInMonth end function public function integer wf_replacedw ();String ls_windowname ls_windowname = This.ClassName ( ) Int rslt = 1 String ls_old_dwname,ls_new_dwname = '' Boolean lb_ch = False ls_old_dwname = dw_1.DataObject ls_new_dwname = f_get_dwprint_dynamic_chname(ls_old_dwname,ls_windowname) IF ls_new_dwname = '' THEN ls_new_dwname = ls_old_dwname ELSE lb_ch = True END IF dw_1.DataObject = ls_new_dwname rslt = dw_1.SetTransObject(sqlca) IF rslt <> 1 THEN IF lb_ch THEN MessageBox('系统提示','替换格式['+ls_new_dwname+']初始化失败!系统将还原为标准格式显示!') dw_1.DataObject = ls_old_dwname dw_1.SetTransObject(sqlca) lb_ch = false END IF END IF dw_1.uf_read_profile_layout() wf_hidecol() f_title_change(dw_1) if lb_ch then if pos(this.title, '[替换]') = 0 then this.title += '[替换]' end if else if pos(this.title, '[替换]') > 0 then this.title = Replace(this.title, pos(this.title, '[替换]'), len('[替换]'), "") end if end if RETURN 1 end function public subroutine wf_hidecol ();return end subroutine public subroutine wf_init_dw1 ();//用于初始化dw1的dataobject //dw_1.dataobject = '' return end subroutine on w_publ_easyq.create int iCurrent call super::create this.cb_2=create cb_2 this.cb_psetup=create cb_psetup this.cb_1=create cb_1 this.st_3=create st_3 this.st_4=create st_4 this.em_1=create em_1 this.em_2=create em_2 this.ddlb_yl=create ddlb_yl this.cbx_yl=create cbx_yl this.dw_1=create dw_1 this.sle_mtrl=create sle_mtrl this.sle_cust=create sle_cust this.st_mtrl=create st_mtrl this.st_cust=create st_cust this.cbx_loginretr=create cbx_loginretr this.pb_em1=create pb_em1 this.pb_em2=create pb_em2 this.pb_2=create pb_2 this.cb_help=create cb_help this.cb_copyself=create cb_copyself this.gb_1=create gb_1 this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.r_bar=create r_bar this.ln_1=create ln_1 this.ln_2=create ln_2 this.ln_3=create ln_3 this.ln_4=create ln_4 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_2 this.Control[iCurrent+2]=this.cb_psetup this.Control[iCurrent+3]=this.cb_1 this.Control[iCurrent+4]=this.st_3 this.Control[iCurrent+5]=this.st_4 this.Control[iCurrent+6]=this.em_1 this.Control[iCurrent+7]=this.em_2 this.Control[iCurrent+8]=this.ddlb_yl this.Control[iCurrent+9]=this.cbx_yl this.Control[iCurrent+10]=this.dw_1 this.Control[iCurrent+11]=this.sle_mtrl this.Control[iCurrent+12]=this.sle_cust this.Control[iCurrent+13]=this.st_mtrl this.Control[iCurrent+14]=this.st_cust this.Control[iCurrent+15]=this.cbx_loginretr this.Control[iCurrent+16]=this.pb_em1 this.Control[iCurrent+17]=this.pb_em2 this.Control[iCurrent+18]=this.pb_2 this.Control[iCurrent+19]=this.cb_help this.Control[iCurrent+20]=this.cb_copyself this.Control[iCurrent+21]=this.gb_1 this.Control[iCurrent+22]=this.ln_bar this.Control[iCurrent+23]=this.ln_bar2 this.Control[iCurrent+24]=this.r_bar this.Control[iCurrent+25]=this.ln_1 this.Control[iCurrent+26]=this.ln_2 this.Control[iCurrent+27]=this.ln_3 this.Control[iCurrent+28]=this.ln_4 end on on w_publ_easyq.destroy call super::destroy destroy(this.cb_2) destroy(this.cb_psetup) destroy(this.cb_1) destroy(this.st_3) destroy(this.st_4) destroy(this.em_1) destroy(this.em_2) destroy(this.ddlb_yl) destroy(this.cbx_yl) destroy(this.dw_1) destroy(this.sle_mtrl) destroy(this.sle_cust) destroy(this.st_mtrl) destroy(this.st_cust) destroy(this.cbx_loginretr) destroy(this.pb_em1) destroy(this.pb_em2) destroy(this.pb_2) destroy(this.cb_help) destroy(this.cb_copyself) destroy(this.gb_1) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.r_bar) destroy(this.ln_1) destroy(this.ln_2) destroy(this.ln_3) destroy(this.ln_4) end on event resize;ln_bar.EndX = This.Width ln_bar2.EndX = This.Width ln_1.EndX = This.Width ln_2.EndX = This.Width ln_3.EndX = This.Width ln_4.EndX = This.Width r_bar.Width = This.Width dw_1.Width = This.Width - dw_1.X - 40 dw_1.Height = This.Height - dw_1.Y - 150 end event event open;call super::open;//dw_1.SetTransObject (sqlca) dw_1.RBUTTON_FILTER_USE = True //右键查询功能开关 IF dw_1.Describe("DataWindow.Objects") = "" THEN dw_1.DataObject = '' IF Trim(dw_1.DataObject) <> '' THEN dw_1.Object.DataWindow.Print.MARGIN.Top = Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_TOP", "110")) dw_1.Object.DataWindow.Print.MARGIN.Left = Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_LEFT", "96" )) dw_1.Object.DataWindow.Print.MARGIN.bottom = Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_BOTTOM", "110")) dw_1.Object.DataWindow.Print.MARGIN.Right = Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_RIGHT", "96" )) END IF This.TriggerEvent('ue_before_openretrieve') IF cbx_loginretr.Checked THEN cb_1.TriggerEvent(Clicked!) END IF end event event activate;IF Trim(dw_1.DataObject) <> '' THEN IF cbx_yl.Enabled AND cbx_yl.Visible THEN cbx_yl.TriggerEvent(Clicked!) END IF end event event key;call super::key;this.TRIGGEREVENT('USER_KEY') end event event ue_before_open;call super::ue_before_open;wf_init_dw1() wf_replacedw() s_edit_index_tran s_tran s_tran = Message.PowerObjectParm IF Not IsNull(s_tran) THEN if_power_sendout = s_tran.if_sendout if_power_print = s_tran.if_print END IF if_ue_sentdataout = if_power_sendout cb_psetup.enabled = if_power_print cb_2.enabled = if_power_print cbx_yl.enabled = if_power_print ddlb_yl.enabled = if_power_print end event event ue_sentdataout;call super::ue_sentdataout;IF NOT if_power_sendout THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF OpenWithParm(w_sentdataout,DW_1) end event event ue_sort;call super::ue_sort;OpenWithParm(w_sortrow,DW_1) String LS_EXPR LS_EXPR = Message.StringParm IF IsNull(LS_EXPR) THEN LS_EXPR = ' ' IF Len(LS_EXPR) > 2 And Trim(LS_EXPR) = '' THEN RETURN DW_1.SetSort(LS_EXPR) DW_1.SetRedraw (False) DW_1.Sort() DW_1.SetRedraw (True) end event event ue_filter;call super::ue_filter;OpenWithParm(w_filter_query,dw_1) String LS_EXPR LS_EXPR = Message.StringParm IF Len(LS_EXPR) > 2 And Trim(LS_EXPR) = '' THEN RETURN dw_1.SetFilter(LS_EXPR) dw_1.SetRedraw (False) dw_1.Filter() dw_1.SetRedraw (True) end event type cb_func from w_publ_base`cb_func within w_publ_easyq integer x = 151 integer width = 151 integer height = 164 end type type cb_exit from w_publ_base`cb_exit within w_publ_easyq integer x = 1115 integer width = 151 integer height = 164 integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type cb_2 from uo_imflatbutton within w_publ_easyq integer x = 814 integer width = 151 integer height = 164 integer taborder = 90 string text = "打印" string normalpicname = "print.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked; IF NOT if_power_print THEN MessageBox(publ_operator,'你没有使用权限!') RETURN END IF IF DW_1.RowCount() >= 1 THEN cbx_YL.Checked = TRUE cbx_YL.TriggerEvent(Clicked!) OpenWithParm(w_sys_printpagesetting,DW_1) ELSE MessageBox('NO','数据窗口中没有任何记录,不能打印!') END IF IF Trim(DW_1.DataObject) = '' THEN RETURN f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_TOP", String(DW_1.Object.DataWindow.Print.MARGIN.Top)) f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_LEFT", String(DW_1.Object.DataWindow.Print.MARGIN.Left)) f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_BOTTOM", String(DW_1.Object.DataWindow.Print.MARGIN.BOTTOM)) f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_RIGHT", String(DW_1.Object.DataWindow.Print.MARGIN.Right)) f_SetProfileString (sys_empid,DW_1.DataObject, "PAPER_SIZE", String(DW_1.Object.datawindow.Print.paper.size) ) f_SetProfileString (sys_empid,DW_1.DataObject, "ORIENTATION", String(DW_1.Object.datawindow.Print.orientation)) end event type cb_psetup from uo_imflatbutton within w_publ_easyq integer x = 558 integer width = 256 integer height = 164 integer taborder = 80 string text = "页面设置" string normalpicname = "PRINTFLD.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;s_print_value s_print s_print.obj_dw = DW_1 s_print.dft_printername = '' OpenWithParm(w_sys_printpage_value,s_print) end event type cb_1 from uo_imflatbutton within w_publ_easyq integer width = 151 integer height = 164 integer taborder = 40 string text = "刷新" string normalpicname = "refresh.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;//DateTime first_date,end_date // //first_date = DateTime(Date(em_1.Text),Time(0)) //end_date = DateTime(Date(em_2.Text),Time('23:59:59')) //String ls_cust_str, ls_mtrl_str //IF Pos(sle_cust.Text,"%") <> 0 THEN // ls_cust_str = trim(sle_cust.Text) //ELSE // ls_cust_str = "%"+trim(sle_cust.Text)+"%" //END IF //IF Pos(sle_mtrl.Text,"%") <> 0 THEN // ls_mtrl_str = trim(sle_mtrl.Text) //ELSE // ls_mtrl_str = "%"+trim(sle_mtrl.Text)+"%" //END IF //dw_1.Retrieve(DATE(EM_1.TEXT),DATE(EM_2.TEXT),ls_cust_str,ls_mtrl_str) //dw_1.OBJECT.date_mid.TEXT=EM_1.TEXT+'~~'+EM_2.TEXT end event type st_3 from statictext within w_publ_easyq integer x = 18 integer y = 208 integer width = 201 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 boolean enabled = false string text = "日期从:" alignment alignment = right! boolean focusrectangle = false end type type st_4 from statictext within w_publ_easyq integer x = 727 integer y = 208 integer width = 105 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 boolean enabled = false string text = "到:" alignment alignment = right! boolean focusrectangle = false end type type em_1 from editmask within w_publ_easyq integer x = 219 integer y = 192 integer width = 407 integer height = 88 integer taborder = 100 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = datemask! string mask = "yyyy-mm-dd" boolean spin = true end type event rbuttondown;s_calender_arg s_calender s_calender.PointerX = THIS.PointerX() s_calender.PointerY = THIS.PointerY() s_calender.X = THIS.X s_calender.Y = THIS.Y OpenWithParm(w_calendar,s_calender) THIS.Text = String(id_date_selected) end event type em_2 from editmask within w_publ_easyq integer x = 832 integer y = 192 integer width = 407 integer height = 88 integer taborder = 110 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = datemask! string mask = "yyyy-mm-dd" boolean spin = true end type event rbuttondown;s_calender_arg s_calender s_calender.PointerX = THIS.PointerX() s_calender.PointerY = THIS.PointerY() s_calender.X = THIS.X s_calender.Y = THIS.Y OpenWithParm(w_calendar,s_calender) THIS.Text = String(id_date_selected) end event type ddlb_yl from dropdownlistbox within w_publ_easyq integer x = 1536 integer y = 16 integer width = 261 integer height = 532 integer taborder = 60 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean enabled = false string text = "适当大小" boolean vscrollbar = true string item[] = {"100%","75%","50%","25%","200%","150%"} borderstyle borderstyle = stylelowered! end type event selectionchanged;dw_1.Object.DataWindow.Print.Preview.Zoom = INTEGER(LEFT(TRIM(this.text),LEN(TRIM(this.text)) - 1)) dw_1.object.DataWindow.Print.Preview = 'yes' end event event constructor;if THIS.TotalItems ( )>=1 then THIS.SelectItem(1) end event type cbx_yl from checkbox within w_publ_easyq integer x = 1317 integer y = 20 integer width = 206 integer height = 76 integer taborder = 70 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "预览" end type event clicked;ddlb_yl.Enabled = THIS.Checked try IF THIS.Checked THEN IF Lower(dw_1.Object.DataWindow.Print.Preview) = 'yes' THEN RETURN dw_1.Object.DataWindow.Print.Preview = 'yes' dw_1.Object.DataWindow.Print.Preview.Rulers = "yes" dw_1.SetRedraw(FALSE) IF Trim(dw_1.DataObject) <> '' THEN Integer margin_top =-1,margin_left=-1,margin_bottom=-1,margin_right=-1,paper_size=-1,orientation=-1 margin_top = Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_TOP", "-1")) margin_left= Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_LEFT", "-1" )) margin_bottom= Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_BOTTOM", "-1")) margin_right= Integer(f_ProfileString(sys_empid,dw_1.DataObject, "MARGIN_RIGHT", "-1" )) paper_size= Integer(f_ProfileString(sys_empid,dw_1.DataObject, "PAPER_SIZE", "-1" )) orientation= Integer(f_ProfileString(sys_empid,dw_1.DataObject, "ORIENTATION", "-1" )) if margin_top > 0 then dw_1.Object.datawindow.Print.margin.Top =margin_top end if if margin_left > 0 then dw_1.Object.datawindow.Print.margin.Left =margin_left end if if margin_bottom > 0 then dw_1.Object.datawindow.Print.margin.bottom =margin_bottom end if if margin_right > 0 then dw_1.Object.datawindow.Print.margin.Right =margin_right end if if paper_size > 0 then dw_1.Object.datawindow.Print.paper.size =paper_size end if if orientation > 0 then dw_1.Object.datawindow.Print.orientation =orientation end if END IF dw_1.SetRedraw(TRUE) ELSE IF Lower(dw_1.Object.DataWindow.Print.Preview) = 'no' THEN RETURN dw_1.Object.DataWindow.Print.Preview = 'NO' END IF catch(runtimeerror err) end try end event event constructor;THIS.BackColor = 14215660 end event type dw_1 from u_dw_rbtnfilter within w_publ_easyq integer y = 412 integer width = 3538 integer height = 1820 boolean bringtotop = true boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean rbutton_setposition_use = true boolean titleclick_sort_use = true end type event retrievestart;call super::retrievestart;cb_reol = cb_1.Enabled cb_1.Enabled = FALSE if_retrieveing = TRUE cur_vspos = THIS.Describe("DataWindow.VerticalScrollPosition") end event event retrieveend;call super::retrieveend;cb_1.Enabled = cb_reol if_retrieveing = FALSE IF Dec(cur_vspos) > 0 THEN THIS.Modify("DataWindow.VerticalScrollPosition="+cur_vspos) END IF end event event doubleclicked;call super::doubleclicked;IF if_mdf_title THEN IF Lower(Left(dwo.Type,4)) = 'text' THEN s_inputbox S_SREU String LS_STR,column_name S_SREU.Title = '目前标题为: '+dwo.Text+' 。请输入新标题: ' S_SREU.OLD_TEXT = dwo.Text column_name = dwo.Name OpenWithParm(w_inputbox,S_SREU) LS_STR = Message.StringParm IF Trim(LS_STR) <> '' And dwo.Text <> LS_STR THEN This.Modify(column_name+'.text="'+LS_STR+'"') END IF END IF END IF end event event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) END IF end event event dwnkey;call super::dwnkey;PARENT.TRIGGEREVENT('USER_KEY') end event type sle_mtrl from singlelineedit within w_publ_easyq boolean visible = false integer x = 1637 integer y = 308 integer width = 677 integer height = 84 integer taborder = 120 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type type sle_cust from singlelineedit within w_publ_easyq boolean visible = false integer x = 475 integer y = 308 integer width = 677 integer height = 84 integer taborder = 130 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type type st_mtrl from statictext within w_publ_easyq boolean visible = false integer x = 1179 integer y = 324 integer width = 453 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "物料编码/名称含:" alignment alignment = right! boolean focusrectangle = false end type type st_cust from statictext within w_publ_easyq boolean visible = false integer x = 14 integer y = 324 integer width = 453 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "客户编号/名称含:" boolean focusrectangle = false end type type cbx_loginretr from checkbox within w_publ_easyq string tag = "此项勾选时,报表打开自动按缺省条件刷新数据,但会耗费系统资源[建议不勾选]" boolean visible = false integer x = 1317 integer y = 104 integer width = 521 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "报表打开自动刷新" boolean checked = true end type event clicked;Long ll_loginretr IF This.Checked THEN ll_loginretr = 1 ELSE ll_loginretr = 0 END IF //f_SetProfileString(sys_empid,DW_1.DataObject, "LOGIN_RETRIEVE", String(ll_loginretr)) f_SetProfileString(sys_empid,Parent.ClassName(), "LOGIN_RETRIEVE", String(ll_loginretr)) end event event constructor;This.BackColor = 14215660 Int ll_loginretr //ll_loginretr = Integer(f_ProfileString(sys_empid,DW_1.DataObject, "LOGIN_RETRIEVE", "1")) ll_loginretr = Integer(f_ProfileString(sys_empid,Parent.ClassName(), "LOGIN_RETRIEVE", "1")) IF ll_loginretr = 1 THEN This.Checked = True ELSE This.Checked = False END IF end event type pb_em1 from picturebutton within w_publ_easyq integer x = 635 integer y = 192 integer width = 101 integer height = 92 integer taborder = 120 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string picturename = "date.BMP" alignment htextalign = left! end type event clicked;em_1.triggerevent(rbuttondown!) end event type pb_em2 from picturebutton within w_publ_easyq integer x = 1248 integer y = 192 integer width = 101 integer height = 92 integer taborder = 110 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string picturename = "date.BMP" alignment htextalign = left! end type event clicked;em_2.triggerevent(rbuttondown!) end event type pb_2 from picturebutton within w_publ_easyq integer x = 1358 integer y = 192 integer width = 101 integer height = 92 integer taborder = 120 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string picturename = "date1.BMP" alignment htextalign = left! end type event clicked;m_Dfc_Control_PopupMenu dmPopupMenu string menustr menustr="Text=本日~tEvent=ue_date1" menustr = menustr + "|" + "Text=本周~tEvent=ue_date2" menustr = menustr + "|" + "Text=本月~tEvent=ue_date3" menustr = menustr + "|" + "Text=上月~tEvent=ue_date4" if len(trim(menustr))<>0 then dmPopupMenu = Create m_Dfc_Control_PopupMenu dmPopupMenu.mf_BuildMenu(This, menustr) dmPopupMenu.mf_PopMenu() Destroy dmPopupMenu end if end event type cb_help from uo_imflatbutton within w_publ_easyq integer x = 965 integer width = 151 integer height = 164 integer taborder = 20 boolean bringtotop = true string text = "帮助" string normalpicname = "help.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;PARENT.TriggerEvent('ue_help') end event type cb_copyself from uo_imflatbutton within w_publ_easyq integer x = 302 integer width = 256 integer height = 164 integer taborder = 30 boolean bringtotop = true string text = "打开副本" string normalpicname = "COPY.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;window lw_win s_edit_index_tran s_rpinfo s_rpinfo.if_sendout = if_power_sendout s_rpinfo.if_print = if_power_print OpenWithParm(lw_win,s_rpinfo,PARENT.ClassName()) lw_win.WindowState = Normal! end event type gb_1 from groupbox within w_publ_easyq boolean visible = false integer x = 357 integer y = 524 integer width = 1125 integer height = 148 integer taborder = 80 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 15793151 end type type ln_bar from line within w_publ_easyq long linecolor = 268435456 integer linethickness = 4 integer beginy = 172 integer endx = 2007 integer endy = 172 end type type ln_bar2 from line within w_publ_easyq long linecolor = 16777215 integer linethickness = 4 integer beginy = 176 integer endx = 2039 integer endy = 176 end type type r_bar from rectangle within w_publ_easyq long linecolor = 16777215 integer linethickness = 4 long fillcolor = 1073741824 integer x = 2139 integer width = 146 integer height = 68 end type event constructor;this.fillcolor = 14215660 this.linecolor = 14215660 this.x = -1 this.y = -1 this.height = ln_bar.beginy - 5 end event type ln_1 from line within w_publ_easyq long linecolor = 268435456 integer linethickness = 4 integer beginy = 292 integer endx = 2016 integer endy = 292 end type type ln_2 from line within w_publ_easyq long linecolor = 16777215 integer linethickness = 4 integer beginy = 296 integer endx = 2048 integer endy = 296 end type type ln_3 from line within w_publ_easyq long linecolor = 268435456 integer linethickness = 4 integer beginy = 404 integer endx = 2016 integer endy = 404 end type type ln_4 from line within w_publ_easyq long linecolor = 16777215 integer linethickness = 4 integer beginy = 408 integer endx = 2048 integer endy = 408 end type