Cognos Analytics

 View Only

 Report URL parameters with &run.prompt=false throws prompt page ALWAYS

Dave P's profile image
Dave P posted Fri March 14, 2025 11:47 AM

I gave up on this about a decade ago, but a new project requiring prompt/parameter values passed in the URL arose and I decided to revisit.  I’m hoping that one of you super-genius folks can either confirm the bug, or help me better understand the behavior so that I can find a workaround.  Many thanks in advance.

In a minimal report with one parameter (pA) and a prompt page with a text box prompt that sets the value of pA, I append the following parameters to the end of the URL obtained from the Share/LINK page:

&run.prompt=false&p_pA=xyz

When I paste the modified URL into the browser, the first thing I see is the prompt page (!!arrggghh!!) with the prompt control’s value pre-populated with “xyz”.  It recognizes the parameter value from the URL, but it is not respecting the run.prompt=false parameter! I can’t get this report (or any other!) to run without throwing the prompt page, which makes the feature USELESS.

(I started VERY minimal, without even a Query – same results. I thought that maybe the report engine wasn’t recognizing the presence of a parameter without seeing it in a Filter/WHERE clause, so I added a minimal Query with the prompt/parameter value in the Filter, but still same results.)

That's the situation.  Here are some images for additional clarity. (Data source is MSSQL since SAP/BW won't accept a query without FROM.)

Thomas Wolf's profile image
Thomas Wolf

I never used &run.prompt=false. The parameter by itself should suffice.

To address your problem, you might want to try one of the following:

  • Sometimes Cognos wants a Prompt Control for the parameter. You can set its properties to Not Required and put it in a Block of Box Type: None - Block.
  • Instead of setting the expression to ?pA?, use the prompt macro. It should read something like #prompt('pA'; 'string'; '')#. Depending on your localization, you might need to use comma instead of semicolon.
  • Another idea would be using the ParamValue macro instead of ?pA?: #ParamValue('pA')#.
César CARDORELLE's profile image
César CARDORELLE

You might also try to change the report's default prompting behaviour in its properties ( Report tab ) from Yes (default value ) to No . ( see below ) .

Dave P's profile image
Dave P

Thanks @Thomas Wolf - Those are great things to try when having prompting issues. I've tried them without success in this situation.
Thanks @César CARDORELLE - That was my first try, but no success.

Ultimately, I would like the finalized report to show the customized prompt page when launched from the Cognos portal (without saved prompt values), but SUPPRESS the customized prompt page when invoked from a custom URL that supplies valid parameter values for all prompts.  I believe that is the behavior that was intended to be enabled by the run.prompt parameter, but it appears to be defective.

Robert Hofstetter's profile image
Robert Hofstetter

Agree with Thomas. I don't think &run.prompt was ever a valid parameter. Here is documentation which says it's just &prompt which has always worked for me: https://www.ibm.com/docs/en/cognos-analytics/11.2.0?topic=mc-creating-custom-urls-display-run-cognos-analytics-content.

Dave P's profile image
Dave P

Thanks @Robert Hofstetter - You might be right.  I can't find it in the dox.  It's been floating around on stackoverflow and other sites for years.  It may have been lifted from an old-style default portal action URL.

So sad that with all of the rich functionality in Cognos there isn't a solution for this problem.  And one would think that if all parameters were satisfied that the DEFAULT action would be to skip redundant prompting.

Dave P's profile image
Dave P

Actually, I did just find it in the current SDK:

https://www.ibm.com/docs/en/cognos-analytics/12.0.0?topic=sets-runoptionenum

prompt

Specifies whether the report service will issue prompts, so that users can enter report option values. To specify this option, use the bibus » runOptionBoolean class.

Default: true

Shaveta Srivastava's profile image
Shaveta Srivastava
Dave P's profile image
Dave P

Thank You @Shaveta Srivastava!  That works!  Grateful for your keen eye.  Disappointed that I missed it.  Always RTFM (read the friendly manual).