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

Scriptable Reports: Prompt API

Started by dougp, 12 Jul 2017 05:12:46 PM

Previous topic - Next topic

dougp

Using Cognos 11.0.4

I'm trying to create a textbox prompt that helps the user by showing values that match what they have already typed.  I have attached the report spec and a JavaScript.

Process:
run the report
type "alb" into the top textbox (This works in Chrome.  For Firefox, try Can)
select Alberta (for Firefox, select Canada)
click out of the textbox and the value is added to the textbox prompt
(if you haven't already) hit F12 to open the browser's developer tools
Notice the log shows the correct value [{"use":"Alberta","display":"Alberta"}]
Click Finish -> Cognos asks for the parameter value
Enter Florida and click Finish
See data for the Florida branch

Try again:
run the report
type "alb" into the top textbox
select Alberta
click out of the textbox and the value is added to the textbox prompt
Change the value in the textbox prompt to Florida and click Finish
No Cognos-generated prompt, but see data for Florida branch.


It appears that the parameter value for the textbox prompt is only set if the user types into the box.  Using the Prompt API correctly sets the value (according to the Prompt API getValues method) but does NOT set the value of the parameter.

One clue, but...
In IE 11 I get a type mismatch error somewhere in the bowels of the Cognos JavaScript and fails to generate the auto-generated prompt page.

I don't know if there is a problem with my code of if there is a problem with the Prompt API.  Maybe the problem is specific to 11.0.4.

Any help is appreciated.


I still think a separate area on this board for scripting in CA Reporting may be helpful.
http://www.cognoise.com/index.php/topic,32196.0.html

dougp


dougp

I was able to test this in 11.0.6.  IE does not produce an error message.  The parameter value is still not set.