COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: tamise on 07 Jul 2013 02:14:45 AM

Title: JAVASCRIPT : Help
Post by: tamise on 07 Jul 2013 02:14:45 AM
Hello,

I have create a page in which there is drilldown (Year) and checkbox (Month) , others thinks and finally a validate box.

The problem is the fact that Year and Month are mondatoty elements, and the checkbox of Month is not in automatic soumission.

So I want to kwown do you know how to write a JAVASCRIPT in which we say that if the drilldown (YEAR) and checkbox (MONTH) are selected when we click on the boutton "validate" it goes to other page, else il write in the textbox "Year or Month have not be selected".

Thanks for your help
Title: Re: JAVASCRIPT : Help
Post by: sundet on 28 Oct 2014 04:07:26 PM
I don't know the answer to this question but you might want to consider saving a cookie with the data.  I tried to use local storage with Cognos but I couldn't get it to work.
Title: Re: JAVASCRIPT : Help
Post by: AM on 07 Apr 2015 06:59:47 PM
Quote from: tamise on 07 Jul 2013 02:14:45 AM
Hello,

I have create a page in which there is drilldown (Year) and checkbox (Month) , others thinks and finally a validate box.

The problem is the fact that Year and Month are mondatoty elements, and the checkbox of Month is not in automatic soumission.

So I want to kwown do you know how to write a JAVASCRIPT in which we say that if the drilldown (YEAR) and checkbox (MONTH) are selected when we click on the boutton "validate" it goes to other page, else il write in the textbox "Year or Month have not be selected".

Thanks for your help
The Prompt API will do this - check out the setValidator function
Title: Re: JAVASCRIPT : Help
Post by: MFGF on 08 Apr 2015 04:20:26 AM
Quote from: AM on 07 Apr 2015 06:59:47 PM
The Prompt API will do this - check out the setValidator function

The prompt API didn't exist in ReportNet (or Cognos 8 or even Cognos 10 up until 10.2). As this question is posted in the ReportNet forum, It doesn't apply here. :)

MF.
Title: Re: JAVASCRIPT : Help
Post by: AM on 09 Apr 2015 01:44:30 AM
Quote from: MFGF on 08 Apr 2015 04:20:26 AM
The prompt API didn't exist in ReportNet (or Cognos 8 or even Cognos 10 up until 10.2). As this question is posted in the ReportNet forum, It doesn't apply here. :)

MF.
My apologies, I didn't pick the structure and naively thought there was only one Report Studio forum.

Perhaps you could achieve the requirement using a second prompts page that conditionally shows with a render variable. The render variable checks to see the conditions have been met. That said, I haven't used ReportNet in almost 10 years, so page render may not have been an option either.