views:

223

answers:

2

My report has a parameter which uses a base enum. The enum has 4 different options to choose when running the report. How do I insert an option which uses all 4 at once?

For example, I have an enum named Phone and it has 4 types: 1 = None, 2 = Home, 3 = Mobile, 4 = Work. In a drop down, how do I add option 5 = None+Home+Mobile+Work?

Thank you!

A: 

Add anoher enum with value All (see NoYes and NoYesAll enums as example)

AxCoder
A: 

Some ways to solve your problem:

  1. You can alter your Enum and add a new EnumValue with something like "All" (like AxCoder answer).

  2. If you don't want (or you can't) modify this Enum you can copy it and create a new Enum with the New value. It will be your responsability to maintain both syncronized with future changes.

  3. And you can leave the Enum without changes, and add another parameter to the report for you to know that the Enum value needs to be ignored by the Query (you have to code that beaviour, obviously)

Hope this helps.

j.a.estevan