COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: vamsivanka on 12 Sep 2017 05:23:02 PM

Title: How to Add Action Button to the Prompt Page
Post by: vamsivanka on 12 Sep 2017 05:23:02 PM
I am trying to add a custom action button to a report "Prompt" page using "Html Item"

My Code inside Html Item:

<form name="proj_review_frm" action="http://mywebpage/apps/pdrs/home.cfm" method="post" target="_blank"> 
            <input type="hidden" name="user_id" value='myuserid'>         
                 <input type="submit" value="     PDRS     ">
         </form>

when i run the report and click the new generated button, it is not talking me to the new page and also the action is not creating a new page tab.

Is there a possible solution for this? Let me know.

Thanks.
Title: Re: How to Add Action Button to the Prompt Page
Post by: dougp on 12 Sep 2017 06:43:13 PM
Somebody is still using Cold Fusion?  Wow!


It's even better in 11.0.7.  In full interactivity mode, JavaScript errors are shown in an alert box.  Without full interactivity mode, the Welcome page loads.

...but where does 'myuserid' come from?  It seems like you'd have two HTML items with a session parameter between them:

HTML Item:
<form name="proj_review_frm" action="http://mywebpage/apps/pdrs/home.cfm" method="post" target="_blank">
        <input type="hidden" name="user_id" value='


HTML Item with source type = Data item value
#sq($account.defaultName)#

HTML Item:
'>
        <input type="submit" value="     PDRS     ">
</form>


But this works:
HTML Item:
<a href="http://www.google.com/search?q=
HTML Item with source type = Data item value
'dinner'
HTML Item:
" target="_blank">Find Food</a>


So, if you're doing that, why not this?
<a href="http://mywebpage/apps/pdrs/home.cfm?user_id=
#sq($account.defaultName)#
" target="_blank">PDRS</a>


Is it a question of POST vs. GET?