Topic
  • 7 replies
  • Latest Post - ‏2013-04-23T18:53:17Z by DPotterSQL
DPotterSQL
DPotterSQL
60 Posts

Pinned topic URL - Passing Parameters

‏2013-04-22T21:08:02Z |

I need to write a URL link that sends a user to a report and provides the prompted value for Region.

I've done this in the past while working for a different company but am having a hard time getting it to work this time. The URL works in that it brings me to the report but it doesn't provide the parameter I trying to pass.

URL:

/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/report-viewer.xts&method=execute&m_obj=/content/folder[@name='Company Folders']/folder[@name='Products']/folder[@name='Company']/folder[@name='HR Reports']/report[@name='**Testing URL Parameters Passed']&backURL=/content/folder[@name='zzzCompany Folders']/folder[@name='Timber Products Company']/folder[@name='UltiPro']/folder[@name='HR Reports']&Region=1234

I am still prompted for the value of Region before I get to the report. I deleted the prompt page already.

Any help is appreciate,

David

  • Paul Mendelson
    Paul Mendelson
    34 Posts
    ACCEPTED ANSWER

    Re: URL - Passing Parameters

    ‏2013-04-23T18:03:30Z  

    Paul,

    Great suggestion but it did not work. Would &run.prompt=false just turn off the user made prompt page? I don't have one on this report. The prompt that is showing up is Cognos generated. The kind you see when you don't make a prompt page and you have a required prompt.

    Thanks,

    David

    Ahh, I see the problem. Parameters need to start with p_.  So if your parameter name is Region, the URL param would be p_Region.

    run.prompt=false will disable all prompt pages, so long as all required parameters are populated.

  • DPotterSQL
    DPotterSQL
    60 Posts

    Re: URL - Passing Parameters

    ‏2013-04-22T21:22:08Z  

    I forgot to mention I am using Cognos 8.4.1

  • OpherB
    OpherB
    664 Posts

    Re: URL - Passing Parameters

    ‏2013-04-22T21:48:33Z  

    It's been a while since I've done this and cannot find my notes just now. Looking atyour URL, I would wonder if Region expects a string and you're giving it a number....

    Did you get any error message? Check the log files, too.

    Good luck,
    Opher

     

  • Paul Mendelson
    Paul Mendelson
    34 Posts

    Re: URL - Passing Parameters

    ‏2013-04-23T10:53:06Z  

    Try adding &run.prompt=false to the end of the url.

  • DPotterSQL
    DPotterSQL
    60 Posts

    Re: URL - Passing Parameters

    ‏2013-04-23T14:33:15Z  
    • OpherB
    • ‏2013-04-22T21:48:33Z

    It's been a while since I've done this and cannot find my notes just now. Looking atyour URL, I would wonder if Region expects a string and you're giving it a number....

    Did you get any error message? Check the log files, too.

    Good luck,
    Opher

     

     

    Opher, 

    I tried editing the the value to make it a string but that did not help. I don't get an error message and I don't have access to the log file in this position. I just sent an email to try and get it.

    Any other suggestions are welcome,

    David

  • DPotterSQL
    DPotterSQL
    60 Posts

    Re: URL - Passing Parameters

    ‏2013-04-23T14:35:59Z  

    Try adding &run.prompt=false to the end of the url.

    Paul,

    Great suggestion but it did not work. Would &run.prompt=false just turn off the user made prompt page? I don't have one on this report. The prompt that is showing up is Cognos generated. The kind you see when you don't make a prompt page and you have a required prompt.

    Thanks,

    David

  • Paul Mendelson
    Paul Mendelson
    34 Posts

    Re: URL - Passing Parameters

    ‏2013-04-23T18:03:30Z  

    Paul,

    Great suggestion but it did not work. Would &run.prompt=false just turn off the user made prompt page? I don't have one on this report. The prompt that is showing up is Cognos generated. The kind you see when you don't make a prompt page and you have a required prompt.

    Thanks,

    David

    Ahh, I see the problem. Parameters need to start with p_.  So if your parameter name is Region, the URL param would be p_Region.

    run.prompt=false will disable all prompt pages, so long as all required parameters are populated.

  • DPotterSQL
    DPotterSQL
    60 Posts

    Re: URL - Passing Parameters

    ‏2013-04-23T18:53:17Z  

    Ahh, I see the problem. Parameters need to start with p_.  So if your parameter name is Region, the URL param would be p_Region.

    run.prompt=false will disable all prompt pages, so long as all required parameters are populated.

    Paul,

    You got it. It has been so long since I last used the URL to deliver one I forgot that was what it takes and miss-read the example I was trying to imitate. 

    Perfect :)

    David