Search code examples
crystal-reportsreport

In Crystal Reports, boolean parameter to select both true and false


Using CR 2008.

I have a Boolean parameter with true and false values which works fine. Is there a way to add a third option to show both such as 'True, False, Show All'?

Without setting the parameter to allow multiple values. I.e. By setting the parameter to allow multiple values I can then just select both true and false. Not what I want - I want 3 single options as mentioned above.

Thanks in advance.


Solution

  • Create a String parameter. Assume a convention. Create a formula:

    if {?MyParameter} = "True" then
      //do stuff like when was true
    else if {?MyParameter} = "False" then
      //do stuff like when was false
    else
      //do new stuff: not true, not false