COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: vinch999 on 28 Mar 2011 07:11:17 AM

Title: How to display a date range
Post by: vinch999 on 28 Mar 2011 07:11:17 AM
Hi,
I have an interval date prompt on the prompt page.

I want to display the selected date range on a graphic title.
(example: From 1 April To 5 April)

When I insert the DATE, I only have the start date

How to display the end date too?

cheers, vinc
Title: Re: How to display a date range
Post by: jcrouch on 28 Mar 2011 08:23:59 AM
Hi,

When you use a Date Prompt with the range property set to Y the paramater will be set to something like this:

Between Mar 8, 2011 and Mar 28, 2011

So you could set your Text Item's Report Expression to:

ParamDisplayValue('parameterName')

If you needed it to say From instead of Between you can use some string functions to change it.

Jeremy
Title: Re: How to display a date range
Post by: vinch999 on 28 Mar 2011 08:30:01 AM
Sorry , I just found the solution by myself!  ;D

How to:

-Add a text
-source type: report expression
-report expression: ParamDisplayValue('Parameter')

8)