Home > database >  How from the field in the process of extraction of statements of the query function add a query cond
How from the field in the process of extraction of statements of the query function add a query cond

Time:10-02

Now under the two procedures:
The first paragraph is produced by the process of reporting,
The second paragraph is the query conditions on each field requirement,
Dw_1. Settransobject (gtr_qry)

This. X=0
This. Y=0

Ii_right=ycr_user. Uf_getright (' KHTS_ZRHF ')

Choose a case ii_right
Case 0
Messagebox (" prompt ", "you do not have permission to use this feature, please contact the system administrator!" , stopsign! , ok!
Close (this)
Return
Case 1
Cb_exp. Enabled=false
Case 2
Cb_exp. Enabled=false
Case 3
Cb_exp. Enabled=true
The end choose

String ls_parm
Lstruc_colname. Struc_colname [1]="company"
Lstruc_colname. Struc_colname [2]="company to undertake the total amount
"Lstruc_colname. Struc_colname [3]="directly responsible to assume total amount"
Lstruc_colname. Struc_colname [4]="bear the total amount of the leadership"
Lstruc_colname. Struc_colname [5]="indirectly led to assume total amount"
Lstruc_colname. Struc_colname [6]="claim report number
"Lstruc_colname. Struc_colname [7]="to accept the time
"
The integer rtncode1
Rtncode1=dw_2. GetChild (name1, colname_child)
IF rtncode1=1 THEN
MessageBox (" Error ", "Not a DataWindowChild")
Return
End the if

Dw_2. Modify (" name1. DDDW. PercentWidth=140 ")

Long ll_rowcount
Long ll_currentrow
Long ll_struccount
Ll_struccount=upperbound (lstruc_colname struc_colname)

Dw_2. Insertrow (0)
For ll_rowcount=1 to ll_struccount
Ll_currentrow=colname_child. Insertrow (0)
Colname_child. Setitem (ll_currentrow, 'colname, lstruc_colname struc_colname [ll_rowcount])
Next



The second condition,
Dw_2. AcceptText ()
Gf_queryfilterdw_delrow (dw_2)

String ls_filter
Ls_filter=""
Long ll_rowcount
Long ll_row
String ls_colnamevalue
Long ll_ii
String ls_value
String ls_czf
String ls_orand
The date ldt_begin_time1
The date ldt_end_time1
Ll_rowcount=dw_2. RowCount ()
//If ll_rowcount & lt;=0 Then
//Return
//End If

Ldt_begin_time1=date (em_begin_time1. Text)
Ldt_end_time1=date (em_end_time1. Text)

For ll_ii=1 To ll_rowcount
Ls_colnamevalue=https://bbs.csdn.net/topics/dw_2.GetItemString (ll_ii, "name1")
Ls_colnamevalue=https://bbs.csdn.net/topics/Trim (ls_colnamevalue)
If IsNull (ls_colnamevalue) Or ls_colnamevaluehttps://bbs.csdn.net/topics/="" Then
The Continue
End the If

Ls_czf=dw_2. GetItemString (ll_ii, 'BJF)
If IsNull (ls_czf) Or ls_czf="" Then
The Continue
End the If

Ls_value=https://bbs.csdn.net/topics/dw_2.GetItemString (ll_ii, "name2")
Ls_value=https://bbs.csdn.net/topics/Trim (ls_value)
If IsNull (ls_value) Or ls_valuehttps://bbs.csdn.net/topics/="" Then
The Continue
End the If

Ls_orand=dw_2. GetItemString (ll_ii, "orand")
Choose a Case ls_colnamevalue
Case "company"
Ls_filter=ls_filter + + ls_czf "gs_name" + "'" + ls_value + "'"
//ls_filter=ls_filter + "V_LPCHL_ZRHF_TONGJI gs_name" + ls_czf + "'" + ls_value + "'"
If ll_ii & lt; Ll_rowcount Then
Ls_filter=ls_filter + ls_orand + "
"End the If
Case "company to undertake the total amount
"If isnumber (ls_value) then
Ls_filter=ls_filter + "hj_gscdje" + + "" + ls_value ls_czf +"
"//ls_filter=ls_filter + "V_LPCHL_ZRHF_TONGJI hj_gscdje" + + "" + ls_value ls_czf +"
"If ll_ii & lt; Ll_rowcount Then
Ls_filter=ls_filter + ls_orand + "
"End the If
The else
MessageBox (" prompt ", "amount only for digital!" , stopsign! , ok!
Return
End the if
Case "directly responsible to assume total amount"
If isnumber (ls_value) then
Ls_filter=ls_filter + "hj_zzrcdje" + + "" + ls_value ls_czf +"
"//ls_filter=ls_filter + "V_LPCHL_ZRHF_TONGJI hj_zzrcdje" + + "" + ls_value ls_czf +"
"If ll_ii & lt; Ll_rowcount Then
Ls_filter=ls_filter + ls_orand + "
"End the If
The else
MessageBox (" prompt ", "amount only for digital!" , stopsign! , ok!
Return
End the if
Case "bear the total amount of the leadership"
If isnumber (ls_value) then
Ls_filter=ls_filter + "hj_zhjld_cdje" + + "" + ls_value ls_czf +"
"//ls_filter=ls_filter + "V_LPCHL_ZRHF_TONGJI hj_zhjld_cdje" + + "" + ls_value ls_czf +"
"If ll_ii & lt; Ll_rowcount Then
Ls_filter=ls_filter + ls_orand + "
"End the If
The else
MessageBox (" prompt ", "amount only for digital!" , stopsign! , ok!
Return
End the if
Case "indirectly led to assume total amount"
If isnumber (ls_value) then
Ls_filter=ls_filter + "hj_jjld_cdje" + + "" + ls_value ls_czf +"
"//ls_filter=ls_filter + "V_LPCHL_ZRHF_TONGJI hj_jjld_cdje" + + "" + ls_value ls_czf +"
"If ll_ii & lt; Ll_rowcount Then
Ls_filter=ls_filter + ls_orand + "
"End the If
The else
MessageBox (" prompt ", "amount only for digital!" , stopsign! , ok!
Return
End the if
Case "claim report number
"If isnumber (ls_value) then
Ls_filter=ls_filter + "hj_masterid" + + "" + ls_value ls_czf +"
"//ls_filter=ls_filter + "V_LPCHL_ZRHF_TONGJI hj_masterid" + + "" + ls_value ls_czf +"
"If ll_ii & lt; Ll_rowcount Then
Ls_filter=ls_filter + ls_orand + "
"End the If
The else
MessageBox (" prompt ", "claim report number only for digital!" , stopsign! , ok!
Return
End the if



The End Choose
Next
If ls_filter="" Then
Ls_filter="1=1"
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related