Home > database >  Could you tell me how to make selective data window shows the data in the table
Could you tell me how to make selective data window shows the data in the table

Time:09-26

Could you tell me how to make selective data window shows the data in the table

CodePudding user response:

After successful to retrieve

CodePudding user response:

According to the filter

CodePudding user response:

SetFilter ()
Function definition data window control filter conditions
Grammar dwcontrol. SetFilter (format)
Parameters dwcontrol data window control name
Format string whose value is used as filter conditions of logical expression expression can be used in the column or column number when using the column number plus a # symbol in front of the column number if the format the value of the parameter is NULL then the program runs original concept will alert users to input filter conditions
Return value Integer function returns 1 on success when an error occurs when the return 1 if any of the value of the parameter for
NULL SetFilter () function returns a NULL
Usage in defining the data window object can define filter conditions such programs run at the same time to retrieve the data in the data window filter does not meet the conditions of data immediately from the main buffer is moved to the filter buffer


Example 1 of the following statements set data window controls dw_Employee filter conditions to format1
Dw_Employee. SetFilter (format1)
Example 2 the following code defines a filter expression and set the expression for the data window control
Dw_Employee Filter conditions through the Filter conditions only cust_qty column value of more than 100 and cust_code column values more than 30 line displays in data window finally call the Filter () function performs Filter conditions
String DWfilter2
DWfilter2="cust_qty & gt; 100 and cust_code & gt; 30 "
Dw_Employee. SetFilter (DWfilter2)
Dw_Employee. Filter ()
Example 3 the following code defines a filter conditions it make data window display only emp_state column value is equal to variable var1 is only worth line in this case, the "ME", "
String Var1
Var1="ME"
Dw_Employee. SetFilter (" emp_state='" + var1 + "' ")
Example 4 the code below the filter is set to null values that allow the user to input filter conditions when the program is run
String null_str
SetNull (null_str)
Dw_main. SetFilter (null_str)
Dw_main. Filter ()

CodePudding user response:

bind
  • Related