To add a custom action for an object such as
a package, folder, URL, job definition, query, report, or report view
in the IBM® Cognos® Connection user interface, you must
modify the system.xml file.
Add a custom action when
you want to run a Software Development Kit application for a particular
class of object, such as a report.
You can pass the following
properties of an object to an application:
- defaultName
- defaultOutputFormat
- searchPath
- uri
- permissions
- usage
- disabled
In the IBM Cognos Connection main view,
custom action icons appear to the left of the More link.
In the Perform an action page, custom actions
appear under the IBM Cognos-specified
actions.
Procedure
- Stop the IBM Cognos service.
- Open the c10_location/templates/ps/portal/system.xml
file in an XML or text editor.
- Locate the following XML code that describes the actions
for the objects in IBM Cognos Connection:
<param name="base-object-actions">
<actions>
...
</actions>
</param>
- Use the following syntax to add a custom action as a child
of the <object> element for the class of object
you want to associate the custom action with. The <object> elements
are children of the <actions> element. Note
that an English tooltip and label are required.
<action name="name" type="custom">
<icon>
icon to show for this element
</icon>
<url>
http-encoded URL to execute
</url>
<label xml:lang="en">
link text
</label>
<tooltip xml:lang="en">
tooltip text
</tooltip>
<label xml:lang="language">
link text
</label>
<tooltip xml:lang="language">
tooltip text
</tooltip>
<objProperties encode="encoding">
<property>
property to be passed to application
</property>
</objProperties>
</action>
For example, the following XML code
defines a custom action for a report object that launches an ASP application
named myapp. The defaultName and searchPath properties
of the report are passed to the application.
<param name="base-object-actions">
<actions>
...
<object class="report">
...
<action name="showPath" type="custom">
<icon>
action_myaction.gif
</icon>
<url>
/myapp.asp</url>
<label xml:lang="en">
View the search path
</label>
<tooltip xml:lang="en">
View the search path
</tooltip>
<label xml:lang="fr">
Afficher le chemin d'accès
</label>
<tooltip xml:lang="fr">
Afficher le chemin d'accès
</tooltip>
<objProperties encode="shift_jis">
<property>
defaultName
</property>
<property>
searchPath
</property>
</objProperties>
</action>
</object>
...
</actions>
</param>
- Save the file.
- Start the IBM Cognos service.