COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Nupur89 on 26 May 2015 01:56:27 AM

Title: Default Selection for date prompt Urgent
Post by: Nupur89 on 26 May 2015 01:56:27 AM
Hi All,

I am trying to create a date filter named as cut-off date you can say.
Now what I want is to add dataitem from query as its default selection.
If anybody can help then please let me know.

Thanks in advance.
Title: Re: Default Selection for date prompt Urgent
Post by: akp on 26 May 2015 04:26:04 AM
Hi Nupur89,

Not sure if you already visited below page ... In case not, this may help you.

http://www.ibm.com/developerworks/library/ba-pp-reporting-scripting_techniques-page634/

Thanks,
--
Sapp
Title: Re: Default Selection for date prompt Urgent
Post by: Nupur89 on 26 May 2015 05:41:52 AM
Thanks Sapp,

I had visited the page before also but I am not able to figure that how we will define dataitem in this javascript.
Title: Re: Default Selection for date prompt Urgent
Post by: Raghuvir on 26 May 2015 06:49:40 AM
Quote from: Nupur89 on 26 May 2015 01:56:27 AM
Hi All,

I am trying to create a date filter named as cut-off date you can say.
Now what I want is to add dataitem from query as its default selection.
If anybody can help then please let me know.

Thanks in advance.

dint get exactly what you trying to achieve...default selection is a value which is present in the data item, for e.g. if you have a data item of year, you can add one of its value e.g. 2014 as its default value.

Regards
Title: Re: Default Selection for date prompt Urgent
Post by: Nupur89 on 26 May 2015 07:31:46 AM
Hi Raghuvir,

Yes data item contains value. I want  to use that value in my default selection based on certain condition.
Currently, when we use date prompt it uses sysdate as default value but I want to use some columns value as its default selection i.e. I dont want to hardcode the default selection. I want it to be dynamic. I know that can be done through javascript but I am stuck on this.

Thanks
Title: Re: Default Selection for date prompt Urgent
Post by: Raghuvir on 26 May 2015 08:04:34 AM
Quote from: Nupur89 on 26 May 2015 07:31:46 AM
Hi Raghuvir,

Yes data item contains value. I want  to use that value in my default selection based on certain condition.
Currently, when we use date prompt it uses sysdate as default value but I want to use some columns value as its default selection i.e. I dont want to hardcode the default selection. I want it to be dynamic. I know that can be done through javascript but I am stuck on this.

Thanks

Hi,

According to the experts it is not recommended to use java script. i am ill literate when it comes to java script :P

still was going through some content on the internet and found this link.

https://www-304.ibm.com/support/docview.wss?uid=swg21370539

hope this would be helpful.

Regards
Title: Re: Default Selection for date prompt Urgent
Post by: Nupur89 on 26 May 2015 10:01:16 AM
Same here I am also not much comfortable with JS.
And thanks for your solution. But its not working. Guess I have to look for other work around for this one...  :(