COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: andy_mason_84 on 15 Oct 2015 04:18:23 AM

Title: Use ID rather than searchPath in Report URL
Post by: andy_mason_84 on 15 Oct 2015 04:18:23 AM
Hi all,

Just a quick one ..
In one of our reports we have created a link to a to another report.

If we have the URL set up using the searchpath as per below it works:
http://server/ibmcognos10/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&run.outputFormat=&run.prompt=true&ui.object=[searchPath]

However if we use the reportID instead it fails.
http://server/ibmcognos10/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&run.outputFormat=&run.prompt=true&ui.object=[ID]

It gives this error: -

The search path "Report ID here" is invalid. An object may contain invalid syntax, or an unsupported character, or the user account in the namespace may not have sufficient privileges. Check the object to ensure that the target destination location does not contain special characters.

Is there a specific bit of syntax that needs to be used when dealing with ID rather than search path?

Cheers.
Title: Re: Use ID rather than searchPath in Report URL
Post by: Lynn on 15 Oct 2015 04:27:10 AM
Quote from: andy_mason_84 on 15 Oct 2015 04:18:23 AM
Hi all,

Just a quick one ..
In one of our reports we have created a link to a to another report.

If we have the URL set up using the searchpath as per below it works:
http://server/ibmcognos10/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&run.outputFormat=&run.prompt=true&ui.object=[searchPath]

However if we use the reportID instead it fails.
http://server/ibmcognos10/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&run.outputFormat=&run.prompt=true&ui.object=[ID]

It gives this error: -

The search path "Report ID here" is invalid. An object may contain invalid syntax, or an unsupported character, or the user account in the namespace may not have sufficient privileges. Check the object to ensure that the target destination location does not contain special characters.

Is there a specific bit of syntax that needs to be used when dealing with ID rather than search path?

Cheers.

I've only ever used the search path, but this link seems to imply a different syntax for ui.object when it is an ID, although it looks a little funny to me with a missing double quote.

http://www-01.ibm.com/support/knowledgecenter/SSRL5J_1.1.0/com.ibm.swg.ba.cognos.ug_cra.10.1.1.doc/c_pageid_instead_of_search_path.html%23PageID_Instead_of_Search_Path?lang=en
Title: Re: Use ID rather than searchPath in Report URL
Post by: andy_mason_84 on 15 Oct 2015 06:03:32 AM
Yeah I have looked at this page but it doesn't show an example of what the URL would look like using the ID so it isn't exactly clear what I need to change.

I have tried the following but it still doesn't work.

http://server/ibmcognos10/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&run.outputFormat=&run.prompt=true&m_page=[ID]

http://server/ibmcognos10/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&run.outputFormat=&run.prompt=true&ui.object=m_page=[ID]

Title: Re: Use ID rather than searchPath in Report URL
Post by: Lynn on 15 Oct 2015 06:43:26 AM
Yeah, it didn't look like a really robust explanation.

If I have time I'll take a stab at using the ID to see if I can get anywhere with it.

Although I have to ask....why don't you just use the search path?
Title: Re: Use ID rather than searchPath in Report URL
Post by: manias on 07 Nov 2016 09:41:27 AM
It is old post, but it is valid url:

http://servername/cognos10/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=storeID(%22storeIDhere%22)