Creating a Custom Call

You can create a Custom Call when you want a URL to be called after the creation of the report. This is a part of the report generating process.

Custom Calls are available for tabular reports, charts, lcharts (lightweight charts), crosstabs, and cubes.

The Custom Call allows external actions to be triggered upon report creation. The URL should be any standard URL that can be called within a browser. The URL may include parameters to pass to other applications.

There are several system-defined parameters and it is also possible to add custom, or user defined, parameters directly to the URL.

Creating a Custom Call

To open the Custom Call window, shown below, click the Custom Call button on the report type specific tab of the Report Designer window.

 

   Figure 159: Custom Call Window

Enabling or Disabling Custom Calls

Whenever a report is run, the report server checks to see if there is a Custom Call associated with that report. If there is an association, and the Custom Call is set to Enable, the URL is called. In order to temporarily disable a Custom Call for a specific report (for example, if the URL calls a program that is not currently working correctly), select Disable. The Custom Call information remains intact and you can select Enable again later.

Choosing a URL Callout Method

Choose the callout method by selecting the Form Post or Get radio buttons.

Specifying the URL to Call

Enter the URL, without any user defined parameters, in the URL field.

Selecting System-Defined Parameters

Select a system-defined parameter by checking the appropriate checkbox. The system defined parameters are described in the following table.

Table 36: System Defined Parameters

Parameter

Description

Report URL

The full URL to the report using the internal report name with ID.

File Location

The full file path, as opposed to a URL, of the snapshot file that was generated.

InfoHome

The full path to the Netcool Reporter server infospc directory.

Snapshot Name

Netcool Reporter snapshot report name without the Netcool Reporter ID.

Snapshot ID

The internal repository ID of the snapshot file.

Session ID

The current session ID used to generate the report.

Current User

The current user running the report.

Server URL

The name of the Netcool Reporter server used to identify it from a web URL. It is fully qualified according to the Netcool Reporter installation settings.

Report Start

The time the report started.

Report Finish

The time the report finished.

 

   Note:


    The Report Start and Report Finish parameters pass the time the report started and finished on the server. The format passed is dictated by the configuration file $INFOHOME/websqlbr/admin/CustomCallConfig.xml. These parameters use the first element as the default time stamp option. If JavaTimeStamp is the first entry, then they return a long time string. The various format options are described in the CustomCallConfig.xml file itself. The settings in this file apply globally.


Entering User-Defined Parameters

Enter user-defined parameters into the Custom field as name=value pairs. Each set of pairs must be separated by an ampersand (&).

For example, in the URL below, color and number are names, and their values are Blue and two (note that the two name=value pairs are separated by an ampersand):

HTTP://www.my.url.com/myapp.jsp?color=Blue&number=two

User-defined parameters and the URL that is called must adhere to standard URL formation or syntax conventions when there are special characters like spaces, slashes, and quotation marks. They must be encoded with their proper equivalents so the browser does not misinterpret them. User-defined parameters are not automatically encoded so the user is responsible for the URL encoding.

The following examples show how system-defined parameters are automatically encoded:

•   %2F is used instead of a slash.

•   %20 instead of a space.

Testing and Troubleshooting

Netcool Reporter includes a test script can be used to verify that the Custom Call feature is working correctly.

The test script is a simple script that reports back the names and values of all of the parameters that are sent to it.

Using the Test Script

The test script location is:

$INFOHOME/jsp/customcall.jsp

To call this script, use a URL similar to the following:

http://hostname:port/infospc/jsp/customcall.jsp

Where hostname is the Netcool Reporter server host machine. The port is optional if your server is configured to use the default value 80.

The Custom Call window displays the following values.

 

   Figure 160: Custom Call Window for the Text Script