filtering on data range for string datatype
Hi Team,
I am using Fastreport community edition v2025.2.0, here I am trying to apply data range filter in "Data Band" filtering for Code. The filter expression is like,
GreaterThanOrEqual([SOMain.Contacts.Code], [FromContactCode])
but it gives error "The name 'GreaterThanOrEqual' does not exists in the current context"
This discussion has been closed.
Comments
Not sure where you got this name, but I think this should just be and expression like:
See also: https://www.fast-report.com/public_download/docs/FRNet/online/en/UserManual/en-US/DialogueForms/DialogFilterBySelectedValues.html
Hello!
The >= operator also works for strings: C# does not apply it to strings (CS0019). For string ranges, you need to use CompareTo:
from the lower bound:
[SOMain.Contacts.Code].CompareTo([FromContactCode]) >= 0both boundaries:
[SOMain.Contacts.Code].CompareTo([FromContactCode]) >= 0 and [SOMain.Contacts.Code].CompareTo([ToContactCode]) <= 0