cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a 3rd Possiblity to a Boolen parameter

Former Member
0 Kudos

Not sure if this is the correct wording, but my report was reading from a view {Drivemaster.OpenToPublic} and the only possible values in the column are 0/1 for True/False.

I initially set this report up with a formula to process the parameter:

if {?OpenToPublic} = 'Yes' then {rpt_DriveMaster.OpenToPublic}

else {rpt_DriveMaster.OpenToPublic} = False

And then to display the selected value in the report as:

if {rpt_DriveMaster.OpenToPublic} then 'Yes'

else 'No'

But now they would like to have the parameter modified to select Yes/No/Both so I believe I need to modify the top formula to read:

if {?OpenToPublic} = 'Yes' then {rpt_DriveMaster.OpenToPublic} = True

else if {?OpenToPublic} = 'No' then {rpt_DriveMaster.OpenToPublic} = False

Hopefully this would return all values if Yes/No are not selected.

But I'm not sure if this is correct and then I am not entirely sure how to change the bottom formula to have the selected columns display "All" instead of Yes or No for "Open to the Public"

Suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Trey,

Make that parameter to Optional prompt, to make optional prompt in the paremeter you need to change the properties of parameter as Optional prompt as "true".

with the optional prompt if you specify 'yes' it will display those vales, if 'NO' it will display those values, if you didn't specify any values then it will display all values.

the formula is look like the below

if (HasValue({?OpenToPublic}) = "Both" then true

else if {?OpenToPublic} = 'Yes' then {rpt_DriveMaster.OpenToPublic} = True

else if {?OpenToPublic} = 'No' then {rpt_DriveMaster.OpenToPublic} = False


Hope the above information will help you.


--Naga.

Former Member
0 Kudos

Thanks Naga,

I wasn't able to get your formula to work, but I added an additional else to my formula and it appears to be working correctly:

if {?OpenToPublic} = 'Yes' then {rpt_DriveMaster.OpenToPublic} = True

else if {?OpenToPublic} = 'No' then {rpt_DriveMaster.OpenToPublic} = False

else {rpt_DriveMaster.OpenToPublic} = {rpt_DriveMaster.OpenToPublic}

Answers (0)