If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Prompt Button

Started by aamuktha, 25 Mar 2008 04:20:43 AM

Previous topic - Next topic

aamuktha

hi Friends,

Here is my query

In my report i have prompt page and report page.
After execute the report on Report page i have "back" button. if user clicks on that button it regenerates to prompt page . Can anyone help me to sort out this problem.

Thanks in advance...

almeids

What is the problem?

aamuktha

this is my requirement

after executing the report on the report page right side top we have run button. if we click on that button it re-directs us to prompt page if report contains. in the same way on report page i have one button called "back". if user clicks on that button it should re-direct to prompt page of that report.( it should work like a run button).

how to do this?
hope so u will understand , if not please reply to me
.

Sunchaser

Hello,

I don't know If I understand correctly what you are expecting to do, but here's an idea:
. put this in a HTML Item

<!--owner-drawned button for prompting-->
<button type="button" name="btnBack" id="btnBack"
style="" class="clsPromptButton"
onmouseover="this.className = 'clsPromptButtonOver'"
onmouseout="this.className = 'clsPromptButton'"
onClick="go_Prompt()">Back to Prompt</button>

<!--function called on-click-->
<script text=javascript>
function go_Prompt()
{
RunReport();
}
</script>

<!--insertion of button-->
<script xmlns:xIE5="http://developer.cognos.com/prompting/x IE5">
var promptButtonfinishCheckDate = new
CPromptButton (document.getElementById("btnBack"),
PROMPTBUTTON_REPROMPT, true);
pageNavigationObserverArray pageNavigationObserverArray.concat('promptButtonbtnBack');
notify();
</script>


Unfortunately, with this 'work around', If you click on this button and then If you click the 'Cancel' button,  the result seems to be an error (I don't know exactly why).
So, an solution more: replace the original 'Cancel Button' by your own button:
. put this in a HTML Item in order to replace the Cancel button

<!--owner-drawned button for prompting-->
<button type="button" name="btnCancel" id="btnCancel"
style="" class="clsPromptButton"
onmouseover="this.className = 'clsPromptButtonOver'"
onmouseout="this.className = 'clsPromptButton'"
onClick="my_Cancel()">Cancel</button>

<!--function called on-click-->
<script text=javascript>
function my_Cancel()
{
executeBackURL();
}
</script>

<!--insertion of button-->
<script xmlns:xIE5="http://developer.cognos.com/prompting/x IE5">
var promptButtonfinishCheckDate = new
CPromptButton (document.getElementById("btnCancel"),
PROMPTBUTTON_CANCEL, true);
pageNavigationObserverArray pageNavigationObserverArray.concat('promptButtonbtnCancel');
notify();
</script>


I didn't tried yet with multiple prompt pages, I think that the 'Back to Prompt' button will redirect us to the first prompt page, and so I don't know if the behaviour of the others buttons on the others pages will be still correct.
So, please 'use it at your own risk', make some tests and let me know if it works fine or not  ;)

Hope it helps

aamuktha

Thanks a lot...

it is working.

Sunchaser