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

Value Prompt Auto-Submit Navigates to First Page

Started by cdallum, 27 Jan 2009 03:07:59 PM

Previous topic - Next topic

cdallum

I'm building a report with two main pages, each with its own value prompt.  I want the user to be able to navigate to either page, select an item from the value prompt on that page, and have the page refresh.  I placed a value prompt on each page and set the auto-submit property to 'Yes'.  The problem is that whenever I click on a new value in the prompt on the second page, it refreshes the report and sends me back to the first page.  Is there a way to stay on the second page when using a value prompt on that page?

Thanks!

Rajaggopal

I cant give an exact solution as such, but i will pour in my comments which could be useful...

I once saw a prompt page which had only a set of prompts to be refreshed on prompt page when a prompt was auto submitted... For that they had used java script, JSP and Java Jakarta struts... The prompt which was autosubmitted was a HTML item with an ID and another HTML item was used to contain the set of prompts that need to be refreshed on autosubmission... This second HTML item was referring to a struts package which had JDBC layer to interact with the database to populate the prompt values accordingly, and also render the prompts using java...

The prompt page contained many such "sets" of prompts and each referred to a different struts package...

The same principle could be applied here somehow, but since it will be an entire report page that needs to be refreshed, i think it could get a little more complicated than it may sound... Im also interested to know a solution for this :)

rellaize

Hi
did you guys find a solution for this?? I've been wondering about javascript that prevents navigation to first report page while auto-submitting.
???
Regards

Lynn

Just say no to Javascript :)

I would use a render variable:

Suppose you have a control that allows a user to select Page 1 or Page 2 with a parameter called ?SelectPage? and static "use" values of either 'Page1' or 'Page2'.

Make a boolean variable called RenderPage1 and set the expression as ?SelectPage? = 'Page1'

Make another boolean variable to control rendering of Page2.

Set the render variable for each page accordingly.

This approach allows the user to make an initial selection and then keeps them on the page for the duration of the session. If you want to let them jump between pages just put the prompt control for page selection on each of the report pages.

Really you could achieve the same effect with just one report page that has the separate content within blocks that you would similarly control with render variables.

Hope this helps.

CognosPaul

JavaScript is awesome! As long as you don't touch any Cognos objects (like prompts) or use any Cognos functions (like getFormWarpRequest), then everything should be fine.


The problem here is actually very simple to solve. An autosubmit prompt will run a check data function, then the finish function once a value has been selected. However, if it's set as a cascade source, then it will run the reprompt function instead. So, logically, the solution is to drag in a new prompt. Set it to cascade from the parameter of your autosubmit prompt. Then set the box type to none. No JavaScript, no variables, just pure and simple Cognos weirdness.

You might want to open a request with IBM to allow users to specify the type of action autosubmit prompts run upon selection.

Lynn

Quote from: PaulM on 02 Jan 2012 02:38:56 AM
JavaScript is awesome!

I bet you really miss Nic since he was a JavaScript Commrade in Arms  ;D

MFGF

Quote from: Lynn on 05 Jan 2012 03:53:23 PM
I bet you really miss Nic since he was a JavaScript Commrade in Arms  ;D

Nic graduated to jquery and started speaking in fluent Hungarian (as far as I was concerned, anyway!) His wit and baffling syntax is sadly missed.


Sent from my iPad using Tapatalk
Meep!