COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: JuliaM on 07 May 2012 02:47:00 PM

Title: Prompt defaults
Post by: JuliaM on 07 May 2012 02:47:00 PM
Hi all,

I have a report that uses filter defined in frameworks for each user for their sales territory. In some cases there are more that one territory. I have a prompt that allows changing territory for the report. The problem is - I can't default report to all territories initially, it comes up blank, untill territory is selected. I can't manage to default to the pre-defined filter data. Help!
Thanks!
Title: Re: Prompt defaults
Post by: wyconian on 09 May 2012 03:05:50 AM
Hi

have you set the filter on your report to be optional?  If you do the report should show all regions if you don't select anything in the prompt.
Title: Re: Prompt defaults
Post by: JuliaM on 09 May 2012 09:01:13 AM
Hi,
Thanks for your answer. Yeah, filters are optional, the problem is - I don't want ALL data, I only want the data from filters.
I think I need some sort of if/else - if prompt is null, then territory = filters(from frameworks), else , territory = prompt... I can't figure out how.
Title: Re: Prompt defaults
Post by: wyconian on 10 May 2012 12:41:21 AM
Ah OK I understand.

I'm not sure how you could do that without making your users slect something at the prompt.  You could try adding a static value like 'Model Prompts' which you could set as your default.  In the filter you could then say
(?prompt? = 'Model Prompt' and territory = filtersfrommodel) or territory = ?prompt?  But the users would have to select the static value for that to work.

Is that any help?
Title: Re: Prompt defaults
Post by: JuliaM on 22 May 2012 10:38:21 AM
Thanks! I ended up adding both filters (framework filter and ?rep? filter) to all queries including prompt query, somehow it worked!  8)