Home > database >  Pb6 dw_1. Setfilter () performing the prompt Expression is not valid
Pb6 dw_1. Setfilter () performing the prompt Expression is not valid

Time:09-18

Pb6 dw_1. Setfilter (), performing the prompt Expression is not valid

String ls_filter

...
.

Ls_filter='

If cxb_1. Checked then
Ls_filter="sle_class not like 'A %'"
End the if

Dw_1. Retrieve ()

Dw_1. Setfilter (ls_filter)/* prompt Expression is not valid when performing a here */
Dw_1. Filter ()

CodePudding user response:

String ls_filter
Ls_filter="sle_class not like 'A %'"
Dw_1. Setfilter (ls_filter)
Dw_1. Filter ()

Take a look at your data if there is a sle_class the fields in the window

CodePudding user response:

Sle_class must be datawindow inside the column name (name)

Not in the database table column name

CodePudding user response:

If the column name defined not ah,,,

CodePudding user response:

refer to the original poster liucj_mschina response:
pb6 dw_1. Setfilter (), performing the prompt Expression is not valid

String ls_filter

.
.

Ls_filter='

If cxb_1. Checked then
Ls_filter="sle_class not like 'A %'"
End the if

Dw_1. Retrieve ()

Dw_1. Setfilter (ls_filter)/* prompt Expression is not valid when performing a here */
Dw_1. Filter ()



Sle_class column names must be dw, and should be a string type, different types of columns, writing is different

CodePudding user response:

Suggest you debug, look at the program flow, if cxb_1 checked=false, so ls_filter=', 'how you filter, understand

CodePudding user response:

reference 1st floor lzp_lrp response:
string ls_filter
Ls_filter="sle_class not like 'A %'"
Dw_1. Setfilter (ls_filter)
Dw_1. Filter ()

Take a look at your data in the window to see if there is sle_class this field


Are there any written as not like...
I usually general such setfilter (' gen=1)/setfilter (' error<> "')

Pay attention to the building of the paste code - & gt;> "Sle_class not like 'A %'" in front of A blank space, more rare that reason?
I prefer no sle_class the name

CodePudding user response:

refer to 6th floor wsyangzuda response:
Quote: refer to 1st floor lzp_lrp response:

String ls_filter
Ls_filter="sle_class not like 'A %'"
Dw_1. Setfilter (ls_filter)
Dw_1. Filter ()

Take a look at your data in the window to see if there is sle_class this field


Are there any written as not like...
I usually general such setfilter (' gen=1)/setfilter (' error<> "')

Pay attention to the building of the paste code - & gt;> "Sle_class not like 'A %'" in front of A blank space, more rare that reason?
I prefer no sle_class the name


Is not like, but need to pay attention to when using a like, if there are two conditions need to use parentheses

CodePudding user response:

7th floor, the moderator
  • Related