Use a URL to start IBM 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 IBM Cognos Connection.
The components can be started from any enabled Web page.
You can use a URL to start the following IBM Cognos 8 components:
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 IBM Cognos Connection and copy the object search path Using a Page ID Instead of 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 2005 Sales Summary:
http://localhost/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 script performs the same function using the cognosLaunch method in an enabled Web page:
cognosLaunch('ui.gateway','http://localhost /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.
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.tool=ReportStuio&ui.gateway=http://localhost/cognos8/cgi-bin/cognos.cgi?&ui.option=/content
When starting Report Studio with the parameterized URL method, specify both the gateway (http://localhost/cognos8/cgi-bin/cognos.cgi?) and the ui.gateway parameter.
Use the following parameters to start Report Studio with the cognosLaunch method:
cognosLaunch("ui.gateway","http://localhost/cognos8/cgi-bin/cognos.cgi?","ui.tool","ReportStudio","ui.option","/content")
This section provides examples for performing specific functions when starting Report Studio using the parameterized URL method.
Starting Report Studio
http://localhost/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost /cgi-bin/cognos.cgi&ui.tool=ReportStudio&ui.object=/content&ui.action=new
Starting Report Studio to a specific package
http://localhost/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost /cgi-bin/cognos.cgi&ui.tool=ReportStudio&ui.object=/content/package[@name='GO Sales (analysis)']&ui.action=new
Editing a report in Report Studio
http://localhost/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost /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 examples for performing specific functions when starting Report Studio using the CognosLaunch method.
Starting Report Studio
cognosLaunch('ui.gateway','http://localhost /cgi-bin/cognos.cgi','ui.tool','ReportStudio')
Starting Report Studio to a specific package
cognosLaunch('ui.gateway','http://localhost /cgi-bin/cognos.cgi','ui.tool','ReportStudio','ui.action','new','ui.object','/content/package[@name=\'GO Sales (analysis)\']')
Editing a report in Report Studio
cognosLaunch('ui.gateway','http://localhost /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/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 /cgi-bin/cognos.cgi','ui.tool','QueryStudio','ui.action','new')
The ui.action parameter is a mandatory for both methods.
The following parameters are optional for Query Studio:
cv.header
Specifies whether to display the header. Acceptable values are true and false.
ui.spec
Specifies an XML document that contains an IBM Cognos 8 report specification. For information about IBM Cognos 8 report specifications, see the report specification topics in the IBM 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 examples for performing specific functions when starting Query Studio using the parameterized URL method.
Starting Query Studio to a specific package
http://localhost/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/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 examples for performing specific functions when starting Query Studio using the CognosLaunch method.
Starting Query Studio to a specific package
cognosLaunch('ui.gateway','http://localhost /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 /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/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost /cgi-bin/cognos.cgi&ui.tool=AnalysisStudio&ui.action=new
When starting Analysis Studio with the parameterized URL method, specify both the gateway (http://localhost/cognos8/cgi-bin/cognos.cgi?) and the ui.gateway parameter.
Use the following parameters to start Analysis Studio with the cognosLaunch method:
cognosLaunch('ui.gateway','http://localhost /cgi-bin/cognos.cgi','ui.tool','AnalysisStudio','ui.action','new')
The ui.object parameter is mandatory for both methods. However, if it is missing, you are prompted to select a package.
This section provides examples for performing specific functions when starting Analysis Studio using the parameterized URL method.
Starting Analysis Studio to a specific package
http://localhost/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost /cgi-bin/cognos.cgi&ui.tool=AnalysisStudio&ui.object=/content/package[@name='Go Data Warehouse (analysis)']&ui.action=new
Viewing an analysis report in Analysis Studio
http://localhost/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.gateway=http://localhost /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 examples for performing specific functions when starting Analysis Studio using the CognosLauch method.
Starting Analysis Studio to a specific package
cognosLaunch('ui.gateway','http://localhost /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 /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/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 /cgi-bin/cognos.cgi','ui.tool','MetricStudio','ui.object','/content')
The ui.object parameter is mandatory for both methods. However, if it is missing, you are prompted to select a package.
This section provides an example when starting Metric Studio using the parameterized URL method.
Starting Metric Studio to a specific package
http://localhost/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 an example when starting Metric Studio using the CognosLaunch method.
Starting Metric Studio to a specific package
cognosLaunch('ui.gateway','http://localhost /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/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=new
Use the following parameters to start Event Studio with the cognosLaunch method:
cognosLaunch('ui.gateway','http://localhost /cgi-bin/cognos.cgi','ui.tool','EventStudio')
The ui.action and ui.object parameters are mandatory. If ui.object is missing, you are prompted to select a package.
This section provides an example when starting Event Studio using the parameterized URL method.
Opening an agent in Event Studio
http://localhost/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 for performing specific functions when starting Event Studio using the CognosLaunch method.
Starting Event Studio
cognosLaunch('ui.gateway','http://localhost /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 /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/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.object=/content/package[@name='Sales and Marketing (cube)']/folder[@name='Report Studio Report Samples']/report[@name='Revenue by Product Brand (2005)']&ui.action=run
Use the following parameters to start Cognos Viewer with the cognosLaunch method:
cognosLaunch('ui.gateway','http://localhost /cgi-bin/cognos.cgi','ui.tool','CognosViewer')
For a complete list of the Cognos Viewer parameters, see the "URL API Reference" Appendix in the SDK Developer Guide.
The following parameters are optional for Cognos Viewer:
Specifies the output format. Acceptable values are CSV, HTML, PDF, singleXLS, XHTML, XLWA, and XML. The default value is HTML.
Note: To protect IBM Cognos 8 and your servers, the IBM 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 examples for performing specific functions when viewing reports using the parameterized URL method.
Viewing saved reports
http://localhost/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
Running live reports
http://localhost/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
Viewing reports in different output modes
http://localhost/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 examples for performing specific functions when viewing reports using the CognosLaunch method.
Viewing saved reports
cognosLaunch('ui.gateway','http://localhost /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 /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 /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 an IBM 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 an IBM 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.