Hi,
I have a Cognos (10.2) report that has 5 optional filters with parameters. I need to add additional filter to my report when users did not select any of the above 5 filters. Please suggest how to do it.
I have used below options in the query filter and no luck :’(.
Ex (for 2 params):
- If (?Param1? is null) Then (If (?Param2? is null) Then ( [Data1]> [data2]) Else (1=1)) Else (1=1)
- If (Paramcount(?Param1?)=0) Then (If (Paramcount(?Param1?)=0) Then ( [Data1]> [data2]) Else (1=1)) Else (1=1)
- If (coalesce(?Param1?,‘1’)=‘1’) Then (If (coalesce(?Param2?,‘1’)=‘1’) Then ( [Data1]> [data2]) Else (1=1)) Else (1=1)
- Adding “If (?Param1? is null) Then (‘A’) Else (‘B’)” as dataitem is making the parameter mandatory.
- Adding “If (?Param1? is null) Then (‘A’) Else (‘B’)” as calculated query is making the parameter mandatory.
Thanks,
Sam