COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: CognosMarson on 03 Jan 2020 02:42:45 AM

Title: Custom parameters
Post by: CognosMarson on 03 Jan 2020 02:42:45 AM
Hi, is it possible to create a prompt that select custom parameters?

e.g. set('something', 'something else', 'something other') = ?pPrompt?

CM
Title: Re: Custom parameters
Post by: Francis aka khayman on 06 Jan 2020 10:59:18 AM
what exactly are you trying to do? in any case you might want to check prompt and promptmany macro
Title: Re: Custom parameters
Post by: CognosMarson on 06 Jan 2020 01:56:56 PM
I am trying to build a crosstable with dynamic columns, rows and measure, where you choose in a promt what to view.


e.g.
#case prompt('pColumns', 'token')
when 'ytd' then '[ytd]'
when 'r12' then '[rolling 12 months]'
else '[ytd]'
end
#


Is there a way to make up the parameters to choose from or do they have to be "precreated" in the cube?

/CM


Title: Re: Custom parameters
Post by: Francis aka khayman on 07 Jan 2020 01:31:46 PM
i'm sure you have a good reason behind this. but if you can, it is much easier if you have several crosstabs. the prompt then displays the crosstab based on the chosen values
Title: Re: Custom parameters
Post by: Andrei I on 10 Jan 2020 09:54:35 AM
QuoteIs there a way to make up the parameters to choose from or do they have to be "precreated" in the cube?
They have to exist in your Query
Title: Re: Custom parameters
Post by: Christian85 on 14 Jan 2020 06:19:55 AM
Hi!

Quote from: CognosMarson on 06 Jan 2020 01:56:56 PM
Is there a way to make up the parameters to choose from or do they have to be "precreated" in the cube?

As far as I understood your question: You could simply create static choices for your prompt?