Filter for reporting between 2 ages

Hi
I hope I am clear with my question. I am writing a database program and want to report a report for persons say between 20 years old and 40. I use a filter in the action section but get a report with persons above 40. Can you tell me what i am doing wrong. I am using the expression (chi:chage >= startage) and (chi:chage<=endage). Hope this is clear.

Many Thanks

Usually, I did filter in this case this way: define schematic filter like
startage <= chi:chage <= endage

and then “split” it to be used in Clarion filter:
(startage <= chi:chage) and (chi:chage <= endage)

be sure you fill startage and endage with init values and chi:chage is a number (not date)

OR you can use INRANGE(expression,low,high) function

Thanks so much for your help.

Kind Regards

1 Like

Also, make sure that startage and endage are bound fields and not in the view (i.e. add them in hot fields and mark them as NotinView and BIND).

I think Clarion will automatically change your <= to <<=, which is necessary for Evaluate, so that should be OK.

2 Likes

Thanks so much Jon

Kind regards