SETRANGE on Option Field with <> operator

A quick question please:

I set the below Range.

RecordA.SETRANGE(RecordA.OptionA, RecordA.OptionA::N);

Is it possible to use the NOT operator (<>) on the field?

i.e.

RecordA.SETRANGE(RecordA.OptionA, **<>**RecordA.OptionA::N);

RecordA.SETRANGE(RecordA.OptionA, RecordA.OptionA::’**<>**N’);

I used different combinations but no luck!

Thanks!

Please check SETFILTER

SETFILTER(“Document Type”,’<>%1’,“Document Type”::Order);

Dear Mohana,

There are up to 3 more SETRANGE statements above this statement on the same record.

By using SETFILTER it messes up the report whenever a user enters manual filters before running the report.

Any other options i could work with SETRANGE?

Thanks and regards

Cant we use SETRANGE and SETFILTER together?