Anda di halaman 1dari 13

Guideline

How to Add and Hide UI Elements


in Cognos Connection
Product(s): Cognos 8
Area of Interest: Infrastructure
How to Add and Hide UI Elements in 2
Cognos Connection

Copyright
Your use of this document is subject to the Terms of Use governing the
Cognos software products and related services which you have licensed or
purchased from Cognos. The information contained in this document is
proprietary information of Cognos Incorporated and/or its licensors and is
protected under copyright and other applicable laws. You may use the
information and methodologies described in this document 'as is' or you may
modify them, however Cognos will not be responsible for any deficiencies or
errors that result from modifications which you make. Copyright 2006 (c)
Cognos Incorporated. All Rights Reserved.
You can print selected pages, a section, or the whole book. Cognos grants
you a non-exclusive, non-transferable license to use, copy, and reproduce the
copyright materials, in printed or electronic format, solely for the purpose of
providing internal training on, operating, and maintaining the Cognos
software.
This document is maintained by the Best Practices, Product and Technology
team. You can send comments, suggestions, and additions to Best Practices,
Product and Technologies.

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 3
Cognos Connection

Contents
1 INTRODUCTION............................................................................................................................. 4
2 COGNOS CONNECTION.................................................................................................................. 4
3 USING THE SYSTEM.XML FILE ......................................................................................................4
4 HOW TO REMOVE A CUSTOM SECTION IN COGNOS CONNECTION FOR ALL USERS................... 5
5 HOW TO REMOVE A CUSTOM SECTION IN COGNOS CONNECTION FOR SPECIFIC USERS,
GROUPS, AND ROLES ................................................................................................................................... 5
6 ADDING A NEW SECTION IN COGNOS CONNECTION .................................................................. 7
7 HOW TO REMOVE A CUSTOM SECTION IN COGNOS CONNECTION USING URLS........................ 8
8 APPENDIX A ................................................................................................................................... 9
8.1 LIST OF SECTION THAT CAN BE HIDDEN ........................................................................................................ 9

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 4
Cognos Connection

1 Introduction
This document describes how administrators can add and hide specific sections
within the Cognos Connection UI. Using the system.xml file, parameters can be
added to add or remove UI components for all users or for specific users, groups,
and roles.

2 Cognos Connection
Cognos Connection provides some easy and quick ways to add custom sections and
to remove particular areas in the UI. Removing sections is especially popular – as it
allows administrators to simplify the end user interface. For example, in the
screenshot below, specific sections in the headers were removed providing this much
simpler UI for consumers.

The functionality does not end here. A fine level of granularity is available – allowing
administrators to removing specific links and buttons and replacing them with their
links. Finally, an administrator can assign these custom sections to particular users,
groups, and roles.

3 Using the System.xml File


The system.xml file provides a lot of flexibility and control over how administrators
can customize the Cognos Connection UI. In this document, we will look at how to

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 5
Cognos Connection

add and remove sections of the UI using this file. The system.xml file is located in
the <install-dir>/c8/templates/ps/portal directory.

4 How to Remove a Custom Section in Cognos


Connection for all Users
To remove a specific section in Cognos Connection:

Backup the system.xml file – located in the <install-dir>/c8/templates/ps/portal


directory.
Edit the system.xml file.
To remove a specific section, append the following parameter.
<param name="ui_hide">
<CC_HEADER_MENU_home/>
</param>

In this case, CC_HEADER_MENU_home is the right-hand side of the Cognos


Connection main header. See the following section for a complete list of all of the
sections that can be hidden.
Note: This setting removes the section of the UI for all users. Refer to the
subsequent section for more information on how to do this on a user, group, or role
basis.

In addition to removing this header, suppose that want to remove all headers,
except the portal tabs and the main logo header.

Restart the Cognos 8 service for the changes to take effect.

5 How to Remove a Custom Section in Cognos


Connection for Specific Users, Groups, and Roles
It is possible to remove specific sections of the Cognos Connection, but only remove
them for specific users, groups, or roles. For example, suppose that I want to
remove the “Excel” button for a particular group of users that I don’t want viewing
reports in Excel. To do this:

In Cognos Connection, browse to a particular user, group, or role.

Click on “Set Properties” for this particular user, group, or role.

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 6
Cognos Connection

Click on the “View Search Path” link.

A pop-up window will appear with an ID. The object ID will appear in this window.
In the screenshot below, the ID for this group is: xOkNvbnN1bWVycw_.

Within a system.xml file, define this group. For example, the following syntax shows
how I can define multiple groups within this file:

<param name="ui_groups">
<group id="g1">xOkNvbnN1bWVycw_</group>
<group id="g2">xOm5ldyBncm91cHM6dWlfUjI_</group>
<group id="55">xOf5ldyBnc4htcHM6dAlfUjI_</group>
</param>

Note: If you are using one of the following five groups, you do not need to create a
new group.

User Description ID

Anonymous Users who can access Cognos 8 without being prompted Anonymous
for authentication

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 7
Cognos Connection

Administrators Users who have the administration capability Administrators

Authenticated All authenticated users, which includes Administrators, Consumers


Users Query Studio Users, and Report Studio Users

Query Studio Users who have the Query Studio capability QSUsers
Users

Report Studio Users who have the Report Studio capability RSUsers
Users

Within the same section of the system.xml file, add the following parameters:

<param name="ui_hide">
<RV_TOOLBAR_BUTTONS_XLS show="Administrators g1 g2
RSUsers"/>
<RV_TOOLBAR_BUTTONS_CSV show="Administrators g1 g2
RSUsers"/>
<RV_TOOLBAR_BUTTONS_XLS show="Administrators g1 g2 RSUsers"/>
<RV_TOOLBAR_BUTTONS_CSV show="Administrators g1 g2 RSUsers"/>
<RV_TOOLBAR_BUTTONS_XLWA show="Administrators g1 g2 RSUsers"/>
<RV_TOOLBAR_BUTTONS_singleXLS show="Administrators g1 g2 RSUsers"/>
</param>

Where the “show = “ are exceptions. More specifically, the users and groups listed
above are those users that will see these options. This means that Administrators,
g1, g2, and RSUsers will see these options, but all other users will not see these
options.

“Cognos Viewer” toolbar for:


Administrators, g1, g2, and
RSUsers
“Cognos Viewer” toolbar for all
other Users

6 Adding a New Section in Cognos Connection


In addition to removing specific sections of Cognos Connection, custom links and
buttons can be added in a similar manner. To do this:
Edit the system.xml file.

To add a custom section to the top right header, add the following parameter:

<param name="ui_add">
<CRN_HEADER_OPTIONS>
<item>
<url>http://www.google.com</url>
<target>_blank</target>

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 8
Cognos Connection

<label xml:lang="en">Google</label>
<tooltip xml:lang="en">Google</tooltip>
<icon>action_search.gif</icon>
</item>
</CRN_HEADER_OPTIONS>
</param>

Where CRN_HEADER_OPTIONS is the section where this custom link will appear.
Additionally, tooltips, language specific links, and buttons can be added in addition to
the links.

Restart the Cognos 8 service for these changes to take effect.

7 How to Remove a Custom Section in Cognos


Connection using URLs
In addition to making these changes through the system.xml file, users can remove
these headers and toolbars using URLs. In particular, the following URL parameter,
“&ui=<list of header to list>”, can be used to selectively hide any or all of the
following header items. For example, to remove all of the headers and toolbars,
append &ui=h1h2h3h4 to the end of a Cognos Connection URL. Any combination of
titles (t1, t2, t3, t4), menus (m1, m2, m3, m4), and headers (h1, h2, h3, h4), shown
below, can be used.

h1 t m1
h2 t m2
h3 t m3
h4 t m4

Notes:
This only applies within Cognos Connection or Cognos Viewer.
A header contains both a title and a menu. For example, &ui=h1 will perform the
same actions as &ui=t1m1.
When viewing a report, to remove all headers and toolbars, simply append this
parameter to the end of the URL:

http://server-name/Cognos8/cgi-
bin/cognos.cgi?b_action=xts.run&m=portal/launch.xts&ui.tool=CognosViewer&ui.acti
on=run&ui.object=/content/package[@name='GO Sales and

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 9
Cognos Connection

Retailers']/folder[@name='Report Studio Report Samples']/report[@name='Banded


Report']&ui=h1h2h3h4

8 Appendix A
8.1 List of Section That Can be Hidden
User Interface Element Description
<CRN_HEADER/> The Cognos Connection
top header (h1)
<CRN_HEADER_TITLE/> Left-hand side of the
Cognos Connection top
header (h1)
<CRN_HEADER_OPTIONS/> Right-hand side of the
Cognos Connection top
header (h1)
<CRN_HEADER_OPTIONS_rs/> Report Studio link
<CRN_HEADER_OPTIONS_qs/> Query Studio link
<CRN_HEADER_OPTIONS_mm/> Metric Studio link
<CRN_HEADER_OPTIONS_ags/> Event Studio link
<CRN_HEADER_OPTIONS_ps/> Analysis Studio link
<CRN_HEADER_OPTIONS_cc/> Cognos Connection link
(Cognos Viewer only)

<CC_HEADER/> Cognos Connection header


(h2)
<CC_HEADER_TITLE/> Left-hand side of the
Cognos Connection header
(h2)
<CC_HEADER_MENU/> Right-hand side of the
Cognos Connection header
(h2)
<CC_HEADER_MENU_home/> "home" link
<CC_HEADER_MENU_return/> "return" link (Cognos
Viewer only)
<CC_HEADER_MENU_preferences/> "preferences" link
<CC_HEADER_MENU_logon/> "logon" link
<CC_HEADER_MENU_logoff/> "logoff" link

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 10
Cognos Connection

<CC_HEADER_MENU_about/> "about" link (Cognos


Viewer only)
<CC_HEADER_MENU_help/> "help" link

<CC_VIEW/> Cognos Connection header


(h3)
<CC_VIEW_TABS/> Left-hand side of the
Cognos Connection header
(h3) that includes the tabs
<CC_VIEW_TOOLS/> Right-hand side of the
Cognos Connection header
(h3) that includes the
tools
<CC_VIEW_TOOLS_directory/> "directory" link
<CC_VIEW_TOOLS_capabilities/> "capabilities" link
<CC_VIEW_TOOLS_schedule/> "schedule" link
<CC_VIEW_TOOLS_administration/> "administration" link
<CC_VIEW_TOOLS_csadministration/> "content administration"
link
<CC_VIEW_TOOLS_portal/> "portal administration"
link
<CC_VIEW_TOOLS_drillthru/> "drill-through definition"
link

<CC_TOOLBAR/> Cognos Connection header


(h4) that includes the path
navigation and toolbar
<CC_TOOLBAR_PATH/> Path navigation
<CC_TOOLBAR_BUTTONS/> Toolbar buttons
<CC_TOOLBAR_BUTTONS_newjobDefinition/> New Job
<CC_TOOLBAR_BUTTONS_newfolder/> New Folder
<CC_TOOLBAR_BUTTONS_newURL/> New URL

New Configuration Folder


<CC_TOOLBAR_BUTTONS_newconfigurationFolder/>

<CC_TOOLBAR_BUTTONS_newrole/> New Role


<CC_TOOLBAR_BUTTONS_newgroup/> New Group

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 11
Cognos Connection

<CC_TOOLBAR_BUTTONS_newnamespaceFolder/> New Namespace Folder


<CC_TOOLBAR_BUTTONS_newdataSource/> New Data Source

New Connection
<CC_TOOLBAR_BUTTONS_newdataSourceConnection/>

<CC_TOOLBAR_BUTTONS_newdataSourceSignon/> New Data Source Signon


<CC_TOOLBAR_BUTTONS_newcontact/> New Contact
<CC_TOOLBAR_BUTTONS_newdistributionList/> New Distribution List
<CC_TOOLBAR_BUTTONS_newprinter/> New Printer

New import deployment


<CC_TOOLBAR_BUTTONS_newimportDeploymentFolder/> folder

New export deployment


<CC_TOOLBAR_BUTTONS_newexportDeploymentFolder/> folder
<CC_TOOLBAR_BUTTONS_import/> New import specification
<CC_TOOLBAR_BUTTONS_export/> New export Specification
<CC_TOOLBAR_BUTTONS_cut/> Cut
<CC_TOOLBAR_BUTTONS_copy/> Copy
<CC_TOOLBAR_BUTTONS_paste/> Paste
<CC_TOOLBAR_BUTTONS_delete/> Delete
<CC_TOOLBAR_BUTTONS_refresh/> Refresh
<CC_TOOLBAR_BUTTONS_selectall/> Select all
<CC_TOOLBAR_BUTTONS_deselectall/> Deselect All
<CC_TOOLBAR_BUTTONS_list/> List view mode
<CC_TOOLBAR_BUTTONS_detail/> Detailed view mode
<CC_TOOLBAR_BUTTONS_properties/> Current folder properties

Configuration folder
<CC_TOOLBAR_BUTTONS_configuration_properties/> properties
<CC_TOOLBAR_BUTTONS_order/> Order
<CC_TOOLBAR_BUTTONS_enable_schedule/> Enable Schedule
<CC_TOOLBAR_BUTTONS_disable_schedule/> Disable Schedule
<CC_TOOLBAR_BUTTONS_view_events/> View Events
<CC_TOOLBAR_BUTTONS_page_sizes/> Page sizes option in
configuration tool
<CC_TOOLBAR_BUTTONS_search/> Search

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 12
Cognos Connection

<CC_TOOLBAR_BUTTONS_newpagelet/> Add a new portal page


<CC_TOOLBAR_BUTTONS_edit_pagelet/> Edit a page

<CC_DIALOG_HEADER/> Not supported


<CC_DIALOG_HEADER_help/> "Help" link

<CC_RUN_OPTIONS_email_attachment/> "Include the report" check


box

<RV_HEADER/> Cognos Viewer header


<RV_HEADER_TITLE/> Left hand side of the
Cognos Viewer header
<RV_HEADER_MENU/> Right hand side of the
Cognos Viewer header
<RV_HEADER_MENU_return/> "return" link
<RV_HEADER_MENU_about/> "about" link

<RV_TOOLBAR/> Not applicable


<RV_TOOLBAR_BUTTONS/> Toolbar options in Cognos
Viewer
<RV_TOOLBAR_BUTTONS_Download/> Download toolbar button.
Applies when download is
enabled.
<RV_TOOLBAR_BUTTONS_Save/> Save toolbar button
<RV_TOOLBAR_BUTTONS_ReportViewSave/> Save As toolbar button
<RV_TOOLBAR_BUTTONS_Send/> Email toolbar button
<RV_TOOLBAR_BUTTONS_Run/> Run toolbar button
<RV_TOOLBAR_BUTTONS_HTML/> HTML format view button
<RV_TOOLBAR_BUTTONS_PDF/> PDF format view button
<RV_TOOLBAR_BUTTONS_XLS/> XLS format view button
<RV_TOOLBAR_BUTTONS_CSV/> CSV format view button
<RV_TOOLBAR_BUTTONS_XML/> XML format view button
<RV_TOOLBAR_BUTTONS_XLWA/> Excel 2002 format view

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.
How to Add and Hide UI Elements in 13
Cognos Connection

<RV_TOOLBAR_BUTTONS_XLS/> Excel 2000 format view


<RV_TOOLBAR_BUTTONS_singleXLS/> Excel 2000 single sheet
format view

<SMT_SCOPE_any/> ‘Any’ choice from the


Scope selection in the
Schedule Management
tool.
<SMT_SCOPE_entries_i_own/> ‘Entries I Own’ choice from
the Scope selection in the
Schedule Management
tool.
<SMT_SCOPE_public_folders/> ‘Public Folders’ choice from
the Scope selection in the
Schedule Management
tool.

Copyright © 2008 Cognos ULC (formerly Cognos Incorporated), an IBM Company. All rights reserved.