Filter Not working when applying LIKE '%STR%'
filter is not working properly showing error when applying filter :
[Table.Item_Name] Like '%gfg%'
its giving 2 errors
1) BC30201 Expression Expected
2) function 'TOString" shadows an override method in base class
where as if i am applying this filter in binding source its working fine
with regards
kutub
[Table.Item_Name] Like '%gfg%'
its giving 2 errors
1) BC30201 Expression Expected
2) function 'TOString" shadows an override method in base class
where as if i am applying this filter in binding source its working fine
with regards
kutub
Comments
Please read about expressions here:
http://fast-report.com/documentation/UserM...expressions.htm
i checked and it is working everywhere else except fast reports!!
ok gimme a example how can i apply filter for searching all item names which contains the word "PSP" if the field of item is [TABLE.ITEMNAME]
gimme both example in vb and c#
with regards
kutbi nahar
There is no "Like" operator in C# or VB.Net. You cannot use it in an expression. Use string class methods such as StartsWith, EndsWith, Contains. Here is the correct filter expression:
[Table.Item_Name].Contains("gfg")
This should work:
[Table.Item_Name] Like "%gfg%"
thanks alex for ur quick reply but this is also not working [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> please provide any working sample where i can apply this type of filter with regards Kutbi Nahar[/img]
According to MSDN, you have to use the following pattern:
[Table.Item_Name] Like "*gfg*"
see at the bottom it is giving error like this i tried all valid method did you tried at your side for filtering with LIKE expression m shock that NONE of USER OF FAST REPORT IS USING LIKE Expression for filtering !!!!
this is the error image
[Table.Item_Name] Like "*gfg*" --> correct
[Table.Item_Name] Like '*gfg*' --> error
thanks alex
but i am lil shocked i created a new report from scratch and it worked but why it not worked in previous i think may be i have changed the script language again and again anyways it solved my probs
thanks
with regards
Regards
Landene
Surendettement