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

POP up function for prompt page *Urgent Plz*

Started by doughtydan, 03 Mar 2010 07:48:18 AM

Previous topic - Next topic

doughtydan

HI all

   Can we have something like Pop up button for the Prompt page ...like

  - I have this prompt page which loads before the reports & is cached
  - instead of going back to prompt page from the report to again change the selection...if we could put a popup and call the prompt page within the report...


Plz help asap

CognosAdmn

Hello,

I am not 100% sure, but I believe its possible to embed a javascript popup function into the HTML part to accomplish what you want.

Another option is...You could create the prompt on the report itself, rather than on the prompt page or popup. The disadvantage of this (vs. the popup) is that the prompt will always be visible.


Shaam.

paddhu

QuoteI am not 100% sure, but I believe its possible to embed a javascript popup function into the HTML part to accomplish what you want.

That's true. However, you must have only the Prompt page in that report, otherwise, once you select the prompt and click finish, the report will appear in the popup window only. I would prefer the second option, which is very practical, though may sometimes not be like by some.

MMcBride

QuoteAnother option is...You could create the prompt on the report itself, rather than on the prompt page or popup. The disadvantage of this (vs. the popup) is that the prompt will always be visible.

Actually there is code to hide these prompts. I have quite a few reports where the Prompts need to be on the Report page but since there are 15 of them we don't want them visible all the time.

So I simply put the reports on the Report Page within a table then used Java Script to hide the table.
When the report runs the end users see a single line "Click here for Prompts" at the top of the report they click this and the prompts are "Expanded" the table is unhidden. I also use the "ishtml' style variable to ensure when the users want to print the reports all prompts and supporting text is hidden in the PDF view that is printed.

The only problem I have with this is that Cascade Prompts don't work very well, they do work but because they force an HTML refresh on each selection and the Javascript hides the Prompts by default each time you select a cascade prompt it autohides the prompts and forces you to reopen them after each click which is annoying.

the code to accomplish this hidden prompt area is as follows

Put an HTML Object before the table containing all the prompts and put in code similar to this:
<script language="JavaScript">
//<!--
var g_NavOpen = 0;

function togglePromptDiv(){
if (g_NavOpen){
document.getElementById('divPromptArea').style.display="none";
document.getElementById('anchorHideShow').innerHTML="Show Filter Prompts";
g_NavOpen = 0;}
else{
document.getElementById('divPromptArea').style.display="";
document.getElementById('anchorHideShow').innerHTML="Hide Filter Prompts";
g_NavOpen = 1;}
}
//-->
</script>
<a href="javascript:togglePromptDiv()" border="0" id="anchorHideShow">Show Filter Prompts</a>
<div id="divPromptArea"  style="display:none">

After the Table put another HTML object in with the following code:
</div>

Make sure all prompts you want hidden are in the table and the HTML objects are above and below - not contained within
Its not a popup window but it serves the same purpose

this code has been tested on 8.2, 8.4, 8.4.1 and 8.4.2

CognosAdmn

Awesome. Thank you for sharing the code.  :)

redmist

Thank you for the code...
On a side note is there a 8.4.2 too now ??

MFGF

Hi,

No, there is no 8.4.2 release.  I suspect what MMcBride meant to say was that he had tested on 8.2, 8.4, 8.4 Fix Pack 1 and 8.4 Fix Pack 2 (but I'm sure he will correct me if I'm mistaken! :))  8.4.1 came after these, and is the "latest and greatest" from IBM as of right now.

Regards,

MF.
Meep!