COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: tamirv on 06 Nov 2011 05:32:02 AM

Title: clear values from prompt page
Post by: tamirv on 06 Nov 2011 05:32:02 AM
hi,
i have a prompt page with 6 value prompts and 2 select and search prompts.
i want to create a link that clean all the selected prompt that the user have selected.

can you help me please....

thanks
tamir
Title: Re: clear values from prompt page
Post by: HalfBloodPrince on 15 Nov 2011 02:30:26 AM
Hi,

Select ur prompt-set name of the prompt in properties ans UNIT then add a HTML element aft the prompt then  add this code  in HTML.

<script type="text/javascript">
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
fW._oLstChoicesUNIT.selectedIndex = -1;
</script>

Only thing is that name u give to  ur prompt replace that with unit.
Try this and let me know.
Title: Re: clear values from prompt page
Post by: tamirv on 15 Nov 2011 04:07:10 AM
thank you for your reply, but this is no what i meant.
your html does deselect the selected prompt.
my problem is that in my prompt page :when the user chooses data from the prompt page and refreshes the page (to start over)  the other prompts change accordingly.
in any case, i solved it by using drill-through into the same report.
Title: Re: clear values from prompt page
Post by: HalfBloodPrince on 15 Nov 2011 04:49:06 AM
You have cascading prompt ? Actually am still not clear about Ur requirement. :P
Title: Re: clear values from prompt page
Post by: tamirv on 15 Nov 2011 06:09:54 AM
yes, i have kind of cascading prompt. for ex. i have 2 prompts: one of employee and one of dates. if i choose the employee mike, and press the reprompt button, in the dates prompt,  i will see only the dates that mike worked.
Title: Re: clear values from prompt page
Post by: HalfBloodPrince on 16 Nov 2011 04:18:18 AM
If you have cascading prompt, that's why its populating values that belong to  selected prompt. If yo remove this cascading of prompts then it will be like what u want ,it will show all the values.but it wil introduces a problem while selection. for eg
you have selected a name 'Harry' then it wil show u all the dates in next value prompt.but for harry records may not be present for all the dates, so ur report will contains no data. so it is advisable to keep cascading prompt