I'm trying to create a report with optional filters. The records have three checkboxes and I'd like to dynamically filter either by their ("Y" or "N") or not at all. I have a static parameter for each containing "Y", "N", and "X" in the value lists with "X" as the default. For testing, I'm using one of each in the parameter prompt. Here's my select expert code:
select {?optMBE}
case "X" : {APVM.udMBE} like "*"
default: {APVM.udMBE} = {?optMBE}
and
select {?optDBE}
case "X" : {APVM.udDBE} like "*"
default: {APVM.udDBE} = {?optDBE}
and
select {?optWBE}
case "X" : {APVM.udWBE} like "*"
default: {APVM.udWBE} = {?optWBE}
When I test using optMBE="Y", optDBE="N", and optWBE="X" I'm getting double the expected results.
It's the same when I use the following If's:
If {?optMBE} = "X" Then {APVM.udMBE} like "*" Else {APVM.udMBE} = {?optMBE} and
If {?optDBE} = "X" Then {APVM.udDBE} like "*" Else {APVM.udDBE} = {?optDBE} and
If {?optWBE} = "X" Then {APVM.udWBE} like "*" Else {APVM.udWBE} = {?optWBE}
When I trim my code down to what the selects (or if's) should be evaluating to:
{APVM.udMBE} = {?optMBE} and
{APVM.udDBE} = {?optDBE} and
{APVM.udWBE} like "*"
I get the correct results. Any ideas on why my select/cases aren't working?
Edited by boweeb - 22 Apr 2011 at 10:07am