COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognosun on 17 Oct 2012 06:54:03 AM

Title: Remove day from date prompt - list box
Post by: cognosun on 17 Oct 2012 06:54:03 AM
Hi Gurus,

Is there any way to remove day number ( 1,2...31) from the Date prompt from the display.

We are using date prompt in the listbox.

Thanks in Advance,
Joys



Title: Re: Remove day from date prompt - list box
Post by: tjohnson3050 on 17 Oct 2012 04:36:30 PM
Do you want to extract the day number from the date chosen, or do you want to only prompt for month and year?
Title: Re: Remove day from date prompt - list box
Post by: cognosun on 17 Oct 2012 11:34:26 PM
Yeah want to see only month and year in prompt.

Using value prompt we achieved it but is there any way using 'date prompt'.

As Cognos don't allow to edit data properties for date prompt.
Title: Re: Remove day from date prompt - list box
Post by: pricter on 18 Oct 2012 05:57:40 AM
Playing a little with the styles you may achieve that
For example with the following code placed it in a html item

<style>
.pd
{
visibility:hidden;
;
}
.pds
{
visibility:hidden;

}
.pw
{
visibility:hidden;
}
</style>


I have achieved the days not to be visible.

With the above you should take into consideration that the value of the prompt will be the current day + month and the year the uses has selected.

So you will have to manipulate the DateParameter in your query
Title: Re: Remove day from date prompt - list box
Post by: cognosun on 18 Oct 2012 12:55:07 PM
It's working offcourse but day number is again appearning in the edit box. We are not using calendar box
Title: Re: Remove day from date prompt - list box
Post by: bdbits on 18 Oct 2012 01:03:43 PM
When we want month/year-only selections for date ranges, we will sometimes use value prompt dropdowns with display values like "September 2012", "August 2012", "July 2012", etc. and use values appropriate to what is needed for a parameter or filter. We typically back them with a query that determines the valid date ranges to present based on what's in the database/cube.

Not necessarily slick looking, but it does the job for us.