Question & Answer
Question
How can a user run a report that uses a URL link and include options such as output format or prompt answers?
Answer
To construct a parameterized URL, you can start by copying the reports Share link from the reports More menu.
1. Click a reports More button | |
2. Click the Share option | |
3. Click the Copy button in the Link section to copy the report URL | |
Report URL example: | http://cognos_analytics_server/bi/?pathRef=.public_folders%2FSamples%2FBy%2Bindustry%2FHealthcare%2FReports%2FAdmissions%2Bby%2Bhospital%2Band%2Bdepartment |
Using the Object Reference
Instead of the path reference to the report, pathRef, the report can be referred to with its object ID objRef parameter.
1. Open the reports Properties panel | |
2. Expand the Advanced section and copy the report ID | |
Report URL using objRef | http://cognos_analytics_server/bi/?objRef=i7CD86C71D4354FDDBABBE08A7E8F4FA2 |
Adding URL Parameters
You can add parameters to the share link copied in the previous steps to specify behaviors such as action (viewOutput, run, edit), format (HTML, PDF, CSV), or prompt parameters and prompt answers.
Example URL parameter syntax:
http://cognos_analytics_server/bi/?pathRef=<path>&<option1>=<value1>&<option2>=<value2>...
http://cognos_analytics_server/bi/?pathRef=<path>&<option1>=<value1>&<option2>=<value2>...
Documentation : Creating custom URLs to display and run Cognos Analytics content
https://www.ibm.com/docs/en/cognos-analytics/11.2.0?topic=mc-creating-custom-urls-display-run-cognos-analytics-content
https://www.ibm.com/docs/en/cognos-analytics/11.2.0?topic=mc-creating-custom-urls-display-run-cognos-analytics-content
Examples:
Open the report in Edit mode with the action parameter, append &action=edit to the URL. | http://cognos_analytics_server/bi/?objRef=i7CD86C71D4354FDDBABBE08A7E8F4FA2&action=edit |
Run the report in PDF format, append &format=PDF to the URL | http://cognos_analytics_server/bi/?objRef=i7CD86C71D4354FDDBABBE08A7E8F4FA2&format=PDF |
Specify answers to report prompts, append the parameter name preceded with p_ and the prompt answer. | http://cognos_analytics_server/bi/?objRef=i7CD86C71D4354FDDBABBE08A7E8F4FA2&p_pHospitalName=Finch%20Regional%20Hospital&p_pDepartment=Internal%20medicine |
Related Information
[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"ARM Category":[{"code":"a8m0z0000001josAAA","label":"Administration-\u003ECustomization"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
03 January 2024
UID
swg21983556