COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: rhythmz on 03 May 2011 09:38:07 AM

Title: Allow prompt to disable\enable a filter in a list report???
Post by: rhythmz on 03 May 2011 09:38:07 AM
I have created a fiscal report in which I want to prompt the user the ability to include Revenue into the report. The revenue transactions are stored in the DB as account type 50. So essentially I want the user to select:

'Yes' for the filter to be disabled (allowing ALL transactions to be reported)
'No' for the filter to be account_type <> '50' (exclude revenue transaction types)

My other prompts are straight forward (Fiscal YEar & Fiscal Period).
I have searched the forums in vain only to find posts that are clear as mud!!!

Thank you to all for your help!!!
Title: Re: Allow prompt to disable\enable a filter in a list report???
Post by: Lynn on 03 May 2011 10:07:21 AM
I think this filter expression might be what you want. Will exclude '50' if they pick 'No' and won't evaluate account type at all if they pick 'Yes'.

Filters ought to evaluate to a simple boolean without conditional (if, case) statements.


( ?IncludeRevenue? = 'No' and [Account Type] <> '50' )
or
( ?IncludeRevenue? = 'Yes' )
Title: Re: Allow prompt to disable\enable a filter in a list report???
Post by: rhythmz on 03 May 2011 11:13:40 AM
I think this may have worked!!!

Mucho Gracias!!!
Title: Re: Allow prompt to disable\enable a filter in a list report???
Post by: Lynn on 03 May 2011 11:24:30 AM
Quote from: rhythmz on 03 May 2011 11:13:40 AM
Mucho Gracias!!!

De Nada :)