COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: actcognosuser on 17 Jul 2014 12:34:10 PM

Title: How to display the dynamic prompt value in crosstab header?
Post by: actcognosuser on 17 Jul 2014 12:34:10 PM
Hello all,

I have multiple prompts which are independent of each other. When user selects only year or month prompt
is there a way to display that paramdisplay() value in the report header?
Title: Re: How to display the dynamic prompt value in crosstab header?
Post by: BigChris on 18 Jul 2014 01:53:34 AM
Yes, just put it in a Layout Calculation and put that in the header
Title: Re: How to display the dynamic prompt value in crosstab header?
Post by: actcognosuser on 18 Jul 2014 08:09:49 AM
The issue is with multiple prompts. Since we cannot pass multiple parameter values,

how can we display the period to date based on user selection. If a user selects month it must display month
or if he selects week it must display only the week.
Title: Re: How to display the dynamic prompt value in crosstab header?
Post by: Lynn on 18 Jul 2014 11:29:10 AM
I'm not sure I completely understand your requirement. It sounds like you want conditionally render your parameter display information. If that is the case then do as BigChris advises and add them all into your header. Then set up conditional rendering so that only the desired one appears, depending on what the user has selected.

If that puts you on the right track and you need more help you'll have to post back with more details on what your parameters are, the choices for each and the criteria by which one thing should render but not the others.
Title: Re: How to display the dynamic prompt value in crosstab header?
Post by: BigChris on 22 Jul 2014 03:06:47 AM
I'm guessing a little here, but it sounds as if you've got something like a prompt that allows the user to choose either "Month" or "Week". Then (and again I'm assuming here) you've got a filter that looks something like:

(p_Period = 'Month' and [Date] between _first_of_month(current_date) and current_date) or (p_Period = 'Week' and _add_days (current_date,-1-_day_of_week (current_date,1)) and current_date)

You  should be able to use the same logic to calculate the same dates to use in your heading.