Search code examples
crystal-reports

Crystal Report: How to use the Operator 'in' with if conditions


I added this crystal report formula but it does not proceed and displayed an error instead. Please see the below for reference.

enter image description here

" If {?@btype} = "All" then {Sp_StockEndingInventory_Batches;1.BATCH_TYPE_} in ('BATCHED', 'NON-BACTHED') else {?@btype}={?@btype}={Sp_StockEndingInventory_Batches;1.BATCH_TYPE_} "

Any ideas? Thanks in advance.

I tried to change the quotes from single to double but it still doesn't work.


Solution

  • Try this instead:

    {?@btype} = "All" OR {?@btype}={Sp_StockEndingInventory_Batches;1.BATCH_TYPE_}