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

JavaScript - Interactive Mode - Autosubmit Prompt Page

Started by Boksberger, 01 Nov 2018 05:14:36 PM

Previous topic - Next topic

Boksberger

Hey All,

I've been able to put together a Javascript that autmatically sets the date for a prompt parameter; however, I need help finding a way to submit the page without requiring user interaction.

I've looked through the documentation, and it says to use cognos.Report.Action.FINISH but this is not working.

Does anyone have thoughts on how to do this in interactive mode? I'm on 11.0.12

dougp

You'll need to be more specific.  Are you using the interactive viewer or the compatible viewer?

Boksberger

The report is in interactive mode (Run with full interactivity: Yes).

I've figured this out and attached the code and report spec here for anyone interested.






dougp

Very nice!
Do you know if the timeout is required because internal features (like setValues) happen asynchronously?  My solution was to make the AutoFinish run at the end of PageModule.Show.  It took some experimentation to wire up the page module and the custom control reliably.

Boksberger

I don't believe the setTimeout is required, but is there in case an asynchronous item occurs.

I have a second js as the Page Module that assigns the values for the date prompts in the page.show call. Per the documentation, the page.show should happen before any of he custom controls occur, but wanted to make sure there wasn't some asynchronous inconsistencies.

Calyps0

Quote from: Boksberger on 01 Nov 2018 05:14:36 PM
Hey All,

I've been able to put together a Javascript that autmatically sets the date for a prompt parameter; however, I need help finding a way to submit the page without requiring user interaction.

I've looked through the documentation, and it says to use cognos.Report.Action.FINISH but this is not working.

Does anyone have thoughts on how to do this in interactive mode? I'm on 11.0.12

How do you set the date prompts?  Do you have an example?  I keep fumbling around with this with full interactive reports and can't seem to get it to work. THanks!

dougp

Same way as other prompt types.  Have you read the documentation?

Calyps0

The autosubmit.js file works great but the setdates.js one seems broken.

jems2021


dougp