Chapter 8. Extending the Client

8. Extending the Client

In this chapter we consider various ways to extend the client side of ReportServer. Some of these extensions will be configured via configuration files and which allow, for example, to add further information tabs to the TeamView or add further links to the module bar. Other extensions need scripting. These include adding additional report exporters, displaying messages on login, or adding custom information to the status bar.

8.1. UrlView - Incorporating Websites and More

Via the configuration file /etc/ui/urlview.xml you can add links and tabs to various locations within ReportServer. For example, you can add a new link to the module bar and specify to which URL it should point. Additionally you can restrict what you want to add to certain users or groups. A typical configuration file could like

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <adminviews>
     <view>
	   <!-- View Configuration -->
	 </view>
   </adminviews>
   <objectinfo>
	 <view>
	   <!-- View Configuration -->
     </view>   
     <view>
	   <!-- View Configuration -->
     </view>
   </objectinfo>
   <module>
	   <!-- View Configuration -->   
   </module>
</configuration>

The three scopes (adminviews, objectinfo and module) allow you to add additional information tabs to objects in the administration module (for example, add an additional tab to a user object displaying information on that particular user), additional tabs to objects in the teamspace and within module you can add additional links to the module bar. The documentation report within teamspaces is by default, for example, integrated via the an objectinfo view configuration.

View configurations all share the following configuration

<view>
 <restrictTo><!-- can be used to restrict this to specific users/groups--></restrictTo> 
 <name>The display name</name>
 <url>http://someUrl/</url>
</view>

Via restrictTo you can specify users by username or groups or OUs (organizational units, i.e., folders in the user tree) via IDs to include this view only for users that match one of the restrictions. The name is the name to be displayed on the tab or in the module bar. The URL denotes the URL to be loaded.

Restrictions are specified in the following form

<restrictTo>
   <users>username1,username2</users>
   <groups>123,234</groups>
    <ous>876</ous>
</restrictTo>

For adminviews and objectinfo views you can further restrict the view to specific object types. This is done by adding a "types" tag which takes a comma separated list of fully qualified names of objects for which this view applies. For example the following restriction would restrict the (objectinfo) view to report objects within the teamspace.

       <types>net.datenwerke.rs.tsreportarea.client.tsreportarea.dto.TsDiskReportReferenceDto</types>

The following types are available for objectinfo views

  • {net.datenwerke.rs.tsreportarea.client.tsreportarea.dto.AbstractTsDiskNodeDto} All Objects in a Teamspace.
  • {net.datenwerke.rs.tsreportarea.client.tsreportarea.dto.TsDiskFolderDto} All folders in a Teamspace.
  • {net.datenwerke.rs.tsreportarea.client.tsreportarea.dto.TsDiskReportReferenceDto} All reports and variants in a Teamspace.
  • {net.datenwerke.rs.scheduleasfile.client.scheduleasfile.dto.ExecutedReportFileReferenceDto} All "exported reports" which were, for example, created by the scheduler.

The following types are available for adminviews

Objects in Report Management.

Prefix: net.datenwerke.rs.core.client.reportmanager.dto.reports.

Type Description
AbstractReportManagerNodeDto All objects in the report management tree.
ReportDto reports
ReportFolderDto folders
Objects in User Management.

Prefix net.datenwerke.security.client.usermanager.dto.

Type Description
AbstractUserManagerNodeDto All objects in the user management tree.
UserDto users
GroupDto groups
OrganisationalUnitDto organisational units (folders)
Objects in the file server.

Prefix net.datenwerke.rs.fileserver.client.fileserver.dto.

Type Description
AbstractFileServerNodeDto All objects in the file server.
FileServerFolderDto folders
FileServerFileDto files
Objects in Data Source Management

Prefix net.datenwerke.rs.core.client.datasourcemanager.dto.

Type Description
AbstractDatasourceManagerNodeDto All objects in data source management.
DatasourceFolderDto folders
DatasourceDefinitionDto data sources
Objects in Dadget Management

Prefix net.datenwerke.rs.dashboard.client.dashboard.dto.

Type Description
AbstractDashboardManagerNodeDto All objects in the dashboard tree
DashboardNodeDto dashboards
DashboardFolderDto folders

You can use replacements within the URL to generate dynamic URLs. The following replacements are available

  • ${username} Is replaced by the current user's username.
  • ${type} Is replaced by the class name of the corresponding object. This replacement is only available for objectinfo and adminviews.
  • ${id} Is replaced by the ID of the corresponding object. This replacement is only available for objectinfo and adminviews.
  • ${reportId} Report objects within a team space are always references. Thus, the replacement ${id} maps to the id of the reference rather than to the id of the actual report. In order to use the actual report's id you can use the replacement ${reportId}
8.1.1. ReportServer Specific URLs

Besides specifying a view via a URL ReportServer you can tell ReportServer to display the preview view of a report. For this, you need to define the URL as

rs:reportpreview://ID

where ID should be replaced by the id of the corresponding report or, for example, by the replacement ${reportId} when defining this view for report objects in the TeamSpace.

Note that, as with any configuration file you need to run config reload on the terminal for changes to take effect. Furthermore you need to reload your browser to see effects as the configuration is loaded onto the client on login.