You can use a URL to start Cognos 8 components and open specified content. For example, you can quickly open a report in Query Studio, or a metric in Metric Studio without using Cognos Connection.
The components can be started from any enabled Web page.
You can use a URL to start the following Cognos 8 components:
There are two methods to start Cognos components: parameterized URLs and the cognosLaunch method. Both methods perform the same function and use the same parameters. You can use either method to perform any UI task.
The parameterized URL method can perform tasks or start specific components using parameters typed in the Web browser address bar. Using both get and post methods, the launch.xts or cc.xts parameter starts the specified Cognos 8 component.
This method requires that the parameters use the following format:
&ArgumentName=ArgumentValue
The ArgumentName parameter specifies the type, and the ArgumentValue parameter specifies the value of the called arguments. All names and values must be character strings.
This method is easier to begin using than the cognosLaunch method because it does not require advance preparation. However, the longer URL-encoded entries are restrained by browser character limits.
You can use these commands to browse content in Cognos Connection or view pages in Cognos Viewer.
The cognosLaunch method uses a JavaScript function to perform tasks and start components. To use the launch utility in a Web page, you must first include the following statement in the HTML file from which you start the specific component:
<script language="JavaScript" src="Cognos8Gateway/cognoslaunch.js"> </script>
Cognos8Gateway is the main Cognos 8 gateway defined in Cognos Configuration.
This statement enables the page to open a specified report in the chosen Cognos component using the cognosLaunch JavaScript parameters.
This method requires that the parameters use the following format:
"Argument Name","Argument Value"
The Argument Name parameter specifies the type, and the Argument Value parameter specifies the value of the called arguments. All names and values must be character strings.
The cognosLaunch method uses a simpler construction than the parameterized URL method, but requires an enabled starting page.
Before using either the parameterized URL or cognosLaunch
method you must first locate the object you want to access. The
easiest way to identify the location of an object, such as a saved report,
is to start Cognos Connection and copy the object search path into
the required URL command. The full path must be copied, as listed
in the report properties, including the relevant package name and
report names.
For example, using the following parameterized URL starts Cognos Viewer and runs the report named Banded Report:
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=/content/package[@name='GO Sales (analysis)']/folder[@name='Report Studio Report Samples']/report[@name='2005 Sales Summary']
The following URL performs the same function using the cognosLaunch method in an enabled Web page:
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','CognosViewer','ui.action','run','ui.object','/content/package[@name=\'GO Sales (analysis)\']/folder[@name=\'Report Studio Report Samples\']/report[@name=\'2005 Sales Summary\']')
The following topics describe each of the parameters used in this example, and examples of some other commonly used parameters.
If you are using the parameterized URL method to start any component, you must use the following parameters with this syntax:
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts
followed by the specific component parameters you want to use.
If you want to start Cognos Connection using the parameterized URL method, use the following URL:
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/cc.xts
The mandatory building blocks for parameterized URL commands are as follows:
This is the mandatory argument value that specifies the Cognos 8 gateway. The gateway name in this example is http://server/cognos8/cgi-bin/cognos.cgi?.
Identifies the action.
Identifies the component interface that displays the result.
Specifies the content store location of the saved report.
If you are using the cognosLaunch method to start any component, use the following parameters with this syntax:
cognosLaunch("ui.gateway"," gateway ","ui.tool"," component")
This is the mandatory argument value that specifies the Cognos 8 gateway.
This is the mandatory argument value that specifies the Cognos 8 component.
In addition to the mandatory parameters required by each Cognos 8 component, you can use the following optional parameters, unless otherwise specified:
Specifies the URI to open after you close the selected component.
Specifies the target folder. Acceptable values are the Content Manager search path or store ID. For more information, see Using Search Paths and Page IDs.
Specifies the action to take. Acceptable values for the components are new and edit. The default is new. Acceptable values for Cognos Viewer are run and view. The default is view.
This parameter is mandatory for Event Studio. You cannot use this parameter with Metric Studio.
Use this parameter when the report that you want to drill through contains a prompt. This parameter specifies the values that fulfill that prompt, and display the requested data. The acceptable value is a Web64-encoded XML string. This string must include the name of the prompt parameter you want to fulfill, and its values. Using the example in Start Parameters, if you wanted to start Cognos Viewer to run the Target report and get information specific to Italy, you would append the URL with the ui.drillThroughTargetParameterValues argument name, followed by this argument value:
<parameterValues SOAP-ENC:arrayType=\"bus:parameterValue[]\" xsi:type=\"SOAP-ENC:Array\"><item xsi:type=\"bus:parameterValue\"><name xsi:type=\"xs:string\">Country</name><value SOAP-ENC:arrayType=\"bus:parmValueItem[]\" xsi:type=\"SOAP-ENC:Array\"><item xsi:type=\"bus:simpleParmValueItem\"><use xsi:type=\"xs:string\">Italy</use></item></value></item></parameterValues>
You cannot use this parameter with Event Studio or Metric Studio.
You can use a URL to open and run a specific report in Report Studio.
Use the following parameters to start Report Studio with the parameterized URL method:
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost/cognos8 /cgi-bin/cognos.cgi&ui.tool=ReportStudio&ui.object=/content&ui.action=new
Use the following parameters to start Report Studio with the cognosLaunch method:
cognosLaunch("ui.gateway","gateway","ui.tool","ReportStudio")
This section provides example parameters for performing specific functions when starting Report Studio.
Starting Report Studio to a specific package
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost/cognos8 /cgi-bin/cognos.cgi&ui.tool=ReportStudio&ui.object=/content/package[@name='GO Sales (analysis)']
Editing a report in Report Studio
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost/cognos8 /cgi-bin/cognos.cgi&ui.tool=ReportStudio&ui.object=/content/package[@name='GO Sales (analysis)']/folder[@name='Report Studio Report Samples']/report[@name='2005 Quarterly Sales Forecast']&ui.action=edit
This section provides example parameters for performing specific functions when starting Report Studio.
Starting Report Studio
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','ReportStudio','ui.action','new','ui.object','/content/package[@name=\'GO Sales (analysis)\']')
Starting Report Studio to a specific package
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','ReportStudio','ui.action','edit','ui.object','/content/package[@name=\'GO Sales (analysis)\']/folder[@name=\'Report Studio Report Samples\']/report[@name=\'2005 Quarterly Sales Forecast\']')
Editing a report in Report Studio
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','ReportStudio','ui.action','edit','ui.object','/content/package[@name=\'GO Sales (analysis)\']/folder[@name=\'Report Studio Report Samples\']/report[@name=\'2005 Quarterly Sales Forecast\']')
You can use a URL to quickly open a specific report in Query Studio.
Use the following mandatory parameters to start Query Studio with the parameterized URL method:
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.tool=QueryStudio&ui.object=/content&ui.action=new
Use the following mandatory parameters to start Query Studio with the cognosLaunch method:
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','QueryStudio','ui.action','new')
The following parameters are optional:
Specifies the path of the target object. Acceptable values are the Content Manager search path or store ID. For more information, see Using Search Paths and Page IDs.
cv.header
Specifies whether to display the header. Acceptable values are true and false.
ui.spec
Specifies an XML document that contains a Cognos 8 report specification. For information about Cognos 8 report specifications, see the report specification topics in the Cognos 8 SDK Developer Guide.
Specifies the output language. Acceptable values are expressed as a hyphenated language-region pair, in accordance with the RFC3066 standard. The default value is en-us.
Specifies whether the report service issues prompts, so you can enter report option values. Acceptable values are true and false. The default value is true.
Use the following parameters for debugging purposes only:
Specifies the output format. Acceptable values are CSV, HTML, PDF, singleXLS, XHTML, XLWA, and XML.
Specifies the maximum amount of time, in seconds, that the server can use to process the request before sending a response to the client. Acceptable values are any integer. Use a value of 0 to make the client wait indefinitely. The default value is 7.
Specifies the maximum amount of time, in seconds, that the server can use to process the request before sending a response to the client. Acceptable values are any integer. Use a value of 0 to make the client wait indefinitely. The default value is 30.
This section provides example parameters for performing specific functions when starting Query Studio.
Starting Query Studio to a specific package
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.tool=QueryStudio&ui.object=/content/package[@name='GO Sales (query)']&ui.action=new
Starting Query Studio to a specific report
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.tool=QueryStudio&ui.object=/content/package[@name='GO Data Warehouse (analysis)']/folder[@name='Query Studio Report Samples']/query[@name='Returns by Product Type']&ui.action=edit
This section provides example parameters for performing specific functions when starting Query Studio.
Starting Query Studio to a specific package
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','QueryStudio','ui.action','new','ui.object','/content/package[@name=\'GO Data Warehouse (analysis)\']')
Starting Query Studio to a specific report
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','QueryStudio','ui.action','edit','ui.object','/content/package[@name=\'GO Data Warehouse (analysis)\']/folder[@name=\'Query Studio Report Samples\']/query[@name=\'Return Quantity by Product Line\']')
You can use a URL to quickly open and run a specific report in Analysis Studio.
Use the following parameters to start Analysis Studio with the parameterized URL method:
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost/cognos8 /cgi-bin/cognos.cgi&ui.tool=AnalysisStudio&ui.action=new
Use the following parameters to start Analysis Studio with the cognosLaunch method:
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','AnalysisStudio','ui.action','new')
This is the mandatory argument that specifies the path of the target object. Acceptable values are the Content Manager search path or store ID. For more information, see Using Search Paths and Page IDs.
This section provides example parameters for performing specific functions when starting Analysis Studio.
Starting Analysis Studio to a specific package
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost/cognos8 /cgi-bin/cognos.cgi&ui.tool=AnalysisStudio&ui.tool=AnalysisStudio&ui.object=/content/package[@name='Go Data Warehouse (analysis)']&ui.action=new
Viewing an analysis report in Analysis Studio
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost/cognos8 /cgi-bin/cognos.cgi&ui.tool=AnalysisStudio&ui.tool=AnalysisStudio&ui.object=/content/package[@name='Sales and Marketing (cube)']/folder[@name='Analysis Studio Report Samples']/analysis[@name='Combine Filters Sample']&ui.action=edit
This section provides example parameters for performing specific functions when starting Analysis Studio.
Starting Analysis Studio to a specific package
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','AnalysisStudio','ui.action','new','ui.object','/content/package[@name=\'Sales and Marketing (cube)\']')
Viewing an analysis report in Analysis Studio
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','AnalysisStudio','ui.action','edit','ui.object','/content/package[@name=\'Sales and Marketing (cube)\']/folder[@name=\'Analysis Studio Report Samples\']/analysis[@name=\'Combine Filters Sample\']')
You can use a URL to quickly open a metric in Metric Studio.
Use the following parameters to start Metric Studio with the parameterized URL method:
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.tool=MetricStudio&ui.action=new
Use the following parameters to start Metric Studio with the cognosLaunch method:
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','MetricStudio')
This is the mandatory argument that specifies the path of the target object. Acceptable values are the Content Manager search path or store ID. For more information, see Using Search Paths and Page IDs.
This section provides example parameters for performing specific functions when starting Metric Studio.
Starting Metric Studio to a specific package
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.tool=MetricStudio&ui.object=/content/package[@name='GO Metrics']&ui.action=new
This section provides example parameters for performing specific functions when starting Metric Studio.
Starting Metric Studio
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','MetricStudio','ui.object','/content')
Starting Metric Studio to a specific package
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','MetricStudio','ui.object','/content/package[@name=\'GO Metrics\']')
You can use a URL to quickly access and edit an agent in Event Studio.
Use the following parameters to start Event Studio with the parameterized URL method:
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.tool=EventStudio&ui.object=/content/package[@name='GO Sales (analysis)']&ui.action=run
Use the following parameters to start Event Studio with the cognosLaunch method:
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','EventStudio')
The following parameters are mandatory:
This parameter specifies the action to take. Acceptable values are new, run, or edit. The default is new.
This parameter specifies the path of the target object. Acceptable values are the Content Manager search path or store ID. For more information, see Using Search Paths and Page IDs.
This section provides examples of parameters for performing specific functions when starting Event Studio.
Opening an agent in Event Studio
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.tool=EventStudio&ui.object=/content/package[@name='GO Events']/agentDefinition[@name='GO Event']&ui.action=run
This section provides examples of parameters for performing specific functions when starting Event Studio.
Starting Event Studio
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','EventStudio','ui.action','new','ui.object','/content/package[@name=\'GO Sales and Retailers\']')
Opening an agent in Event Studio
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','EventStudio','ui.action','edit','ui.object','/content/package[@name=\'GO Events\']/agentDefinition[@name=\'GO Event\']')
You can use a URL to quickly open a specified report in Cognos Viewer.
Use the following parameters to start Cognos Viewer with the parameterized URL method:
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=view&ui.object=/content/package[@name=/content/package[@name='Sales and Marketing (cube)']/folder[@name='Report Studio Report Samples']/report[@name='Revenue by Product Brand'])
Use the following parameters to start Cognos Viewer with the cognosLaunch method:
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','CognosViewer')
For a complete list of the Cognos Viewer parameters, see "URL API Reference" Appendix in the SDK Developer Guide.
The following parameters are optional:
Specifies the output format. Acceptable values are CSV, HTML, PDF, singleXLS, XHTML, XLWA, and XML.
Note: To protect Cognos 8 and your servers, the Cognos Application Firewall (CAF) rejects URL-based requests for output in XLS format.
Specifies the output language. Acceptable values are expressed as a hyphenated language-region pair, in accordance with the RFC3066 standard. The default value is en-us.
Specifies whether the report service issues prompts, so you can enter report option values. Acceptable values are true and false. The default value is true.
Specifies the location of an XSL stylesheet that can be applied to the report, thereby rendering it in the requested format. An acceptable value is a URI.
When referencing the XSL file, ensure that the specified file is valid, and exists on the application server in the templates/rsvp/xsl directory. Referencing an invalid stylesheet terminates the process.
Specifies how output documents in the response are encapsulated. Acceptable values are HTML, URL, URLQueryString, none.
Specifies how attachments to the response are encoded. Acceptable values are base64, MIME, MIMECompressed. The default value is base64.
Specifies the maximum amount of time, in seconds, that the server can use to process the request before sending a response to the client. Acceptable values are any integer. Use a value of 0 to make the client wait indefinitely.The default value is 7.
Specifies the maximum amount of time, in seconds, that the server can use to process the request before sending a response to the client. Acceptable values are any integer. Use a value of 0 to make the client wait indefinitely.The default value is 30.
This section provides example parameters for performing specific functions when viewing reports.
Viewing saved reports
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=view&ui.object=defaultOutput(/content/package[@name='GO Sales (analysis)']/folder[@name='Report Studio Report Samples']/report[@name='2005 Sales Summary\'])
Running live reports
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=/content/package[@name='GO Sales (analysis)']/folder[@name='Report Studio Report Samples']/report[@name='2005 Sales Summary']
Viewing reports in different output modes
http://localhost/cognos8/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.object=/content/package[@name='GO Sales (analysis)']/folder[@name='Report Studio Report Samples']/report[@name='2005 Sales Summary']&ui.action=run&run.outputFormat=PDF
This section provides example parameters for performing specific functions when viewing reports.
Viewing saved reports
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','CognosViewer','ui.action','view','ui.object','defaultOutput(/content/package[@name='GO Sales (analysis)']/folder[@name='Report Studio Report Samples']/report[@name='2005 Sales Summary'])')
Running live reports
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','CognosViewer','ui.action','run','ui.object','/content/package[@name='GO Sales (analysis)']/folder[@name='Report Studio Report Samples']/report[@name='2005 Sales Summary']')
Viewing reports in different output modes
cognosLaunch('ui.gateway','http://localhost/cognos8 /cgi-bin/cognos.cgi','ui.tool','CognosViewer','ui.action','run','ui.object','/content/package[@name='GO Sales and Retailers']/folder[@name= 'Report Studio Report Samples']/report[@name='2005 Sales Summary']','run.outputFormat', 'PDF')
This feature allows you to start a Cognos 8 component in a named browser window.
To do this, you must use the following parameters with this syntax:
cognosLaunchInWindow(windowName, windowProperties, "ui.gateway"," gateway","ui.tool","component")
The windowName and windowProperties parameters represent the values specific to starting a Cognos 8 component in a named browser window.
The windowName string is the name of the browser window, frame, or iframe in which to start the specified component. If the specified name does not exist, a newly created pop-up browser window appears with the name. To create a new pop-up window, use "_blank" as the value.
The windowProperties string defines the properties applied to the new pop-up window. This only applies to newly created windows. The available values depend on the type of the Web browser you are using, and correspond to the values supported by the JavaScript window.open() function. Some options may not work in all browsers.
The windowProperties parameter consists of a comma-separated list. Each item consists of an option and a value, separated by the equals sign (=). For example, "fullscreen=yes , toolbar=yes". Some common examples include:
Specifies whether to display the window in theater mode, and show the channel band. The default is no. Acceptable values are yes and no.
Specifies whether to add directory buttons. The default is yes. Acceptable values are yes and no.
Specifies whether to display the browser in full-screen mode. This mode hides the browser's title bar and menus. A window in full-screen mode must also be in channelmode. The default is no. Acceptable values are yes and no.
This integer specifies the height of the window, in pixels. The minimum value is 100.
This integer specifies the left position, in pixels, relative to the upper-left corner of the screen.
Specifies whether to display the input field for entering URLs directly into the browser. The default is yes. Acceptable values are yes and no.
Specifies whether to display the menu bar. The default is yes. Acceptable values are yes and no.
Specifies whether to display resize handles at the corners of the window. The default is yes. Acceptable values are yes and no.
Specifies whether to display horizontal and vertical scroll bars. The default is yes. Acceptable values are yes and no.
Specifies whether to display a status bar at the bottom of the window. The default is yes. Acceptable values are yes and no.
Specifies whether to display a title bar for the window. This parameter is only valid if the calling application is an HTML Application, or a trusted dialog box. The default is yes. Acceptable values are yes and no.
Specifies whether to display the browser toolbar. The default is yes. Acceptable values are yes and no.
This integer specifies the top position, in pixels. This value is relative to the upper-left corner of the screen.
This sets the width of the window, in pixels. The minimum value is 100.
The ui.gateway, ui.tool, along with some additional parameter values are described in Start Parameters.