1234567891011121314151617181920212223242526272829 |
- $PBExportHeader$f_var.srf
- $PBExportComments$自定义变量函数--自定义函数
- global type f_var from function_object
- end type
- forward prototypes
- global function string f_var (string s_var)
- end prototypes
- global function string f_var (string s_var);string ls1,ls2
- int li1,li2
- if isvalid(w_rpt_preview) then
- //ls1=w_rpt_preview.istr_rpt.uservar
- elseif isvalid(w_rpt_edit) then
- ls1=w_rpt_edit.istr_rpt.uservar
- end if
- //参数:s_var="系统名称='酒店系统',操作员='Mr. Zhang'"
- if ls1>'' then
- if right(ls1,1)<>',' then ls1=ls1+','
- li1=pos(ls1,s_var+'=')
- if li1=0 then return ''
- li2=pos(ls1,",",li1)
- if li2=0 then return ''
- ls2=mid(ls1,li1+len(s_var)+2,li2 -(li1+len(s_var)+2) -1)
- end if
- return ls2
- end function
|