To use Cognos product documentation, you must enable JavaScript in your browser.

Starting Cognos 8 Components

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.

Parameterized URL Method

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.

cognosLaunch Method

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.

Start Parameters

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.

Mandatory Parameterized URL 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:

Mandatory cognosLaunch Parameters

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")
Common Optional Parameters

In addition to the mandatory parameters required by each Cognos 8 component, you can use the following optional parameters, unless otherwise specified:

Starting Report 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")

Parameterized URL Examples

This section provides example parameters for performing specific functions when starting Report Studio.

cognosLaunch Examples

This section provides example parameters for performing specific functions when starting Report Studio.

Starting Query Studio

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:

Use the following parameters for debugging purposes only:

Parameterized URL Examples

This section provides example parameters for performing specific functions when starting Query Studio.

cognosLaunch Examples

This section provides example parameters for performing specific functions when starting Query Studio.

Starting Analysis Studio

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')

Parameterized URL Examples

This section provides example parameters for performing specific functions when starting Analysis Studio.

cognosLaunch Examples

This section provides example parameters for performing specific functions when starting Analysis Studio.

Starting Metric Studio

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')

Parameterized URL Examples

This section provides example parameters for performing specific functions when starting Metric Studio.

cognosLaunch Examples

This section provides example parameters for performing specific functions when starting Metric Studio.

Starting Event Studio

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:

Parameterized URL Examples

This section provides examples of parameters for performing specific functions when starting Event Studio.

cognosLaunch Examples

This section provides examples of parameters for performing specific functions when starting Event Studio.

Starting Cognos Viewer

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:

Parameterized URL Examples

This section provides example parameters for performing specific functions when viewing reports.

cognosLaunch Examples

This section provides example parameters for performing specific functions when viewing reports.

Starting Cognos 8 Components in a Specified Browser Window

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:

The ui.gateway, ui.tool, along with some additional parameter values are described in Start Parameters.