I currently have the record selection formula below in a report, if basically means if the choice All has been selected then it wont filter the records other wise it will fiter by what was choosen.
Becasue there are two variables I have to stipulate each case that can happen, hence the four formulas.
I now have another report where I have about 5 choices and want to write a similar formula (but would end up with a ton of cases) and I was wondering is there another way.
THE QUESTION IS
The only idea I can think of (but am not sure if it can be done) I can build a string (the easy bit) and then execute that string. Or set the record slection formula to that string.
Is this possible?????
if {?Organisation} = 'All' and {?Month} = 'All' then
{employee_full_time_summary.fiscal_year} = {?Fiscal Year}
else if {?Organisation} = 'All' and {?Month} <> 'All' then
{employee_full_time_summary.fiscal_year} = {?Fiscal Year}
and {employee_full_time_summary.proc_per_name} in {?Month}
else if {?Organisation} <> 'All' and {?Month} = 'All' then
{employee_full_time_summary.fiscal_year} = {?Fiscal Year}
and {employee_full_time_summary.organisation} in {?Organisation}
else if {?Organisation} <> 'All' and {?Month} <> 'All' then
{employee_full_time_summary.fiscal_year} = {?Fiscal Year}
and {employee_full_time_summary.organisation} in {?Organisation}
and {employee_full_time_summary.proc_per_name} in {?Month}
Becasue there are two variables I have to stipulate each case that can happen, hence the four formulas.
I now have another report where I have about 5 choices and want to write a similar formula (but would end up with a ton of cases) and I was wondering is there another way.
THE QUESTION IS
The only idea I can think of (but am not sure if it can be done) I can build a string (the easy bit) and then execute that string. Or set the record slection formula to that string.
Is this possible?????
if {?Organisation} = 'All' and {?Month} = 'All' then
{employee_full_time_summary.fiscal_year} = {?Fiscal Year}
else if {?Organisation} = 'All' and {?Month} <> 'All' then
{employee_full_time_summary.fiscal_year} = {?Fiscal Year}
and {employee_full_time_summary.proc_per_name} in {?Month}
else if {?Organisation} <> 'All' and {?Month} = 'All' then
{employee_full_time_summary.fiscal_year} = {?Fiscal Year}
and {employee_full_time_summary.organisation} in {?Organisation}
else if {?Organisation} <> 'All' and {?Month} <> 'All' then
{employee_full_time_summary.fiscal_year} = {?Fiscal Year}
and {employee_full_time_summary.organisation} in {?Organisation}
and {employee_full_time_summary.proc_per_name} in {?Month}