Guideline How to Add and Hide UI Elements in Product(s): Cognos 8 Area of Interest: Infrastructure
2 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.
3 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
4 1 Introduction This document describes how administrators can add and hide specific sections within the 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 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 UI. In this document, we will look at how to
5 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 : 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, 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, browse to a particular user, group, or role. Click on Set Properties for this particular user, group, or role.
6 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 for authentication Anonymous
7 Administrators Users who have the administration capability Administrators Authenticated Users Query Studio Users Report Studio Users All authenticated users, which includes Administrators, Query Studio Users, and Report Studio Users Users who have the Query Studio capability Users who have the Report Studio capability Consumers QSUsers RSUsers 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 In addition to removing specific sections of, 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>
8 <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 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 h2 h3 h4 t t t t m1 m2 m3 m4 Notes: This only applies within 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/cgibin/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
9 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 <CRN_HEADER/> <CRN_HEADER_TITLE/> <CRN_HEADER_OPTIONS/> <CRN_HEADER_OPTIONS_rs/> <CRN_HEADER_OPTIONS_qs/> <CRN_HEADER_OPTIONS_mm/> <CRN_HEADER_OPTIONS_ags/> <CRN_HEADER_OPTIONS_ps/> <CRN_HEADER_OPTIONS_cc/> Description The top header (h1) Left-hand side of the top header (h1) Right-hand side of the top header (h1) Report Studio link Query Studio link Metric Studio link Event Studio link Analysis Studio link link (Cognos Viewer only) <CC_HEADER/> <CC_HEADER_TITLE/> <CC_HEADER_MENU/> <CC_HEADER_MENU_home/> <CC_HEADER_MENU_return/> <CC_HEADER_MENU_preferences/> <CC_HEADER_MENU_logon/> <CC_HEADER_MENU_logoff/> header (h2) Left-hand side of the header (h2) Right-hand side of the header (h2) "home" link "return" link (Cognos Viewer only) "preferences" link "logon" link "logoff" link
10 <CC_HEADER_MENU_about/> <CC_HEADER_MENU_help/> "about" link (Cognos Viewer only) "help" link <CC_VIEW/> <CC_VIEW_TABS/> <CC_VIEW_TOOLS/> <CC_VIEW_TOOLS_directory/> <CC_VIEW_TOOLS_capabilities/> <CC_VIEW_TOOLS_schedule/> <CC_VIEW_TOOLS_administration/> <CC_VIEW_TOOLS_csadministration/> <CC_VIEW_TOOLS_portal/> <CC_VIEW_TOOLS_drillthru/> header (h3) Left-hand side of the header (h3) that includes the tabs Right-hand side of the header (h3) that includes the tools "directory" link "capabilities" link "schedule" link "administration" link "content administration" link "portal administration" link "drill-through definition" link <CC_TOOLBAR/> <CC_TOOLBAR_PATH/> <CC_TOOLBAR_BUTTONS/> <CC_TOOLBAR_BUTTONS_newjobDefinition/> <CC_TOOLBAR_BUTTONS_newfolder/> <CC_TOOLBAR_BUTTONS_newURL/> <CC_TOOLBAR_BUTTONS_newconfigurationFolder/> <CC_TOOLBAR_BUTTONS_newrole/> <CC_TOOLBAR_BUTTONS_newgroup/> header (h4) that includes the path navigation and toolbar Path navigation Toolbar buttons New Job New Folder New URL New Configuration Folder New Role New Group
11 <CC_TOOLBAR_BUTTONS_newnamespaceFolder/> <CC_TOOLBAR_BUTTONS_newdataSource/> <CC_TOOLBAR_BUTTONS_newdataSourceConnection/> <CC_TOOLBAR_BUTTONS_newdataSourceSignon/> <CC_TOOLBAR_BUTTONS_newcontact/> <CC_TOOLBAR_BUTTONS_newdistributionList/> <CC_TOOLBAR_BUTTONS_newprinter/> <CC_TOOLBAR_BUTTONS_newimportDeploymentFolder/> <CC_TOOLBAR_BUTTONS_newexportDeploymentFolder/> <CC_TOOLBAR_BUTTONS_import/> <CC_TOOLBAR_BUTTONS_export/> <CC_TOOLBAR_BUTTONS_cut/> <CC_TOOLBAR_BUTTONS_copy/> <CC_TOOLBAR_BUTTONS_paste/> <CC_TOOLBAR_BUTTONS_delete/> <CC_TOOLBAR_BUTTONS_refresh/> <CC_TOOLBAR_BUTTONS_selectall/> <CC_TOOLBAR_BUTTONS_deselectall/> <CC_TOOLBAR_BUTTONS_list/> <CC_TOOLBAR_BUTTONS_detail/> <CC_TOOLBAR_BUTTONS_properties/> <CC_TOOLBAR_BUTTONS_configuration_properties/> <CC_TOOLBAR_BUTTONS_order/> <CC_TOOLBAR_BUTTONS_enable_schedule/> <CC_TOOLBAR_BUTTONS_disable_schedule/> <CC_TOOLBAR_BUTTONS_view_events/> <CC_TOOLBAR_BUTTONS_page_sizes/> <CC_TOOLBAR_BUTTONS_search/> New Namespace Folder New Data Source New Connection New Data Source Signon New Contact New Distribution List New Printer New import deployment folder New export deployment folder New import specification New export Specification Cut Copy Paste Delete Refresh Select all Deselect All List view mode Detailed view mode Current folder properties Configuration folder properties Order Enable Schedule Disable Schedule View Events Page sizes option in configuration tool Search
12 <CC_TOOLBAR_BUTTONS_newpagelet/> <CC_TOOLBAR_BUTTONS_edit_pagelet/> Add a new portal page Edit a page <CC_DIALOG_HEADER/> <CC_DIALOG_HEADER_help/> Not supported "Help" link <CC_RUN_OPTIONS_email_attachment/> "Include the report" check box <RV_HEADER/> <RV_HEADER_TITLE/> <RV_HEADER_MENU/> <RV_HEADER_MENU_return/> <RV_HEADER_MENU_about/> Cognos Viewer header Left hand side of the Cognos Viewer header Right hand side of the Cognos Viewer header "return" link "about" link <RV_TOOLBAR/> <RV_TOOLBAR_BUTTONS/> <RV_TOOLBAR_BUTTONS_Download/> <RV_TOOLBAR_BUTTONS_Save/> <RV_TOOLBAR_BUTTONS_ReportViewSave/> <RV_TOOLBAR_BUTTONS_Send/> <RV_TOOLBAR_BUTTONS_Run/> <RV_TOOLBAR_BUTTONS_HTML/> <RV_TOOLBAR_BUTTONS_PDF/> <RV_TOOLBAR_BUTTONS_XLS/> <RV_TOOLBAR_BUTTONS_CSV/> <RV_TOOLBAR_BUTTONS_XML/> <RV_TOOLBAR_BUTTONS_XLWA/> Not applicable Toolbar options in Cognos Viewer Download toolbar button. Applies when download is enabled. Save toolbar button Save As toolbar button Email toolbar button Run toolbar button HTML format view button PDF format view button XLS format view button CSV format view button XML format view button Excel 2002 format view
13 <RV_TOOLBAR_BUTTONS_XLS/> <RV_TOOLBAR_BUTTONS_singleXLS/> Excel 2000 format view Excel 2000 single sheet format view <SMT_SCOPE_any/> <SMT_SCOPE_entries_i_own/> <SMT_SCOPE_public_folders/> Any choice from the Scope selection in the Schedule Management tool. Entries I Own choice from the Scope selection in the Schedule Management tool. Public Folders choice from the Scope selection in the Schedule Management tool.