COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: kbasha2004 on 21 Oct 2009 09:50:36 AM

Title: prompt along with report header dynamically
Post by: kbasha2004 on 21 Oct 2009 09:50:36 AM
Hi ...

This is regarding prompt along with report header .....

I need to display data in the report ,based on the value of the prompt and also Report header needs to reflect the same value of the Prompt.

For example: I have a query item Country:

If COUNTRY = 'US' is chosen ,the US data needs to be displayed and Report header should display ""  US Only  ""

IF other country chosen we need to display Non-US data and heading as NON-US (COUNTRY NOT= 'US').

Please help me in accomplishing the prompt.

Thanks in Adv,


Kbasha
Title: Re: prompt along with report header dynamically
Post by: Gopinath on 21 Oct 2009 11:23:33 AM
Create a boolean variable based on your prompt

in your case ?Country? = 'US'

place a text item in your report header and assign the boolean variable to the text source variable of the text item and display the text accordingly
Title: Re: prompt along with report header dynamically
Post by: kbasha2004 on 21 Oct 2009 08:41:47 PM
Hi Gopinath,

Thanks for your reply. Unfortunately I cannot create a boolean variable as we need to give the user a choice to see US, Non-US or both US and Non-US data. When both is chosen then I need to display 1st US Data followed by Non-US data. The trick here is not only the data needs to be US related but Report Tile(dynamic heading as per the value chosen in prompt) should reflect "This is US Data" followed by Non-US data along with Report Title changed to "This is Non-US Data".

So, I think I need to create a string variable. But I'm not sure what type of prompt I need to create for this (I tried to create value prompt, but that did not show any values). Can you please suggest a solution.

Thanx in advance for the help extended!

Kbasha
Title: Re: prompt along with report header dynamically
Post by: vinu on 22 Oct 2009 12:29:24 AM
Create calculation Data Item
Try With ParamDisplayValue('Country') in Report Header.

Regards,
Venu.Y
Title: Re: prompt along with report header dynamically
Post by: kbasha2004 on 27 Oct 2009 09:05:16 PM
Thanks
Title: Re: prompt along with report header dynamically
Post by: rcaesar on 28 Oct 2009 08:35:29 AM
Hi Kbasha,

how about something like this:

If ?Country? = 'US' then (?Country?  + ' ' + 'Only')
else ('Not US')

Hope that helps