COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: chr.93 on 31 Mar 2020 04:15:24 AM

Title: Default dynamic values for date prompt
Post by: chr.93 on 31 Mar 2020 04:15:24 AM
Hello to all

I have a date range prompt and I have a request to have default values from the first day of the current month to the day before the current day.
Is there a way to achieve that?
Title: Re: Default dynamic values for date prompt
Post by: BigChris on 31 Mar 2020 05:14:05 AM
This might not be the best way to do it, but it works for me:

http://cognostips.weebly.com/blog/date-prompts
Title: Re: Default dynamic values for date prompt
Post by: chr.93 on 31 Mar 2020 06:21:58 AM
Quote from: BigChris on 31 Mar 2020 05:14:05 AM
This might not be the best way to do it, but it works for me:

http://cognostips.weebly.com/blog/date-prompts

ok , i get that but this requires to add another prompt. They don't want that. :-\
Title: Re: Default dynamic values for date prompt
Post by: BigChris on 31 Mar 2020 07:39:55 AM
You're probably looking at JavaScript to interact with the Prompt API then
Title: Re: Default dynamic values for date prompt
Post by: chr.93 on 01 Apr 2020 10:06:58 AM
Quote from: BigChris on 31 Mar 2020 07:39:55 AM
You're probably looking at JavaScript to interact with the Prompt API then

Do you have a JavaScript like that? I have found one but i can't seem to be able to make it work in Cognos 11
Title: Re: Default dynamic values for date prompt
Post by: BigChris on 02 Apr 2020 01:56:43 AM
Nope - I toyed with the idea for a little while, but I don't have any JaveScript knowledge so I wouldn't be able to support it if it went wrong.

Give 'em the extra prompt and tell 'em to suck it up  ;D