Basic embedded report JavaScript parameters and examples
This section explains the report URL parameters with examples.
Using the JavaScript API
You can use a single JavaScript URL to load a report or dashboard on your HTML page. You can also customize the report or dashboard to display and load content on demand from other scripts.
On your HTML page, include a script tag that points to your Remedy Smart Reporting server. Include the report or dashboard identifier as a parameter in the URL, for example:
<!-- report example -->
<script type="text/javascript" src="http://reporting.example.com/JsAPI?reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63"></script>
<!-- dashboard example -->
<script type="text/javascript" src="http://reporting.example.com/JsAPI?dashUUID=3b0b6c9a-9dfb-41f0-b85a-eb17bb8aeeb9"></script>
The URL to the API is based on the URL used to access the Remedy Smart Reporting front end. For example, if you access Remedy Smart Reporting through http://reporting.example.com:8080/, the JavaScript API URL is http://reporting.example.com:8080/JsAPI. The URL is accessible from anywhere (internal network, external, VPN, and so on).
Report URL Parameters
The reportUUID
parameter identifies a report. For backwards compatibility, the reportId
or wsName
parameters also identify the report.
You can add other parameters, which can alter the way the report is displayed. The available parameters are:
Parameter | Description |
---|---|
| The unique ID identifying the dashboard to load. The |
| The numeric report ID identifying the report to load. The Note: We recommend using the |
| The Web Service name identifying the report to load. The Note: We recommend using the |
| The ID of the html element in which to load the report. If this is not included, a container element is created when the script tag is included. |
| Displays the title bar at the top of the report. The default is |
| Displays the Info button in the title bar. The default is |
| Displays the Filters button in the title bar. The default is |
| Displays the Sections button in the title bar (for reports with tabbed or multi-page sections). The default is |
| Displays the Series button in the title bar (for reports with the series selection option). The default is |
| Displays the previous page/next page button in title bar (for reports with multiple pages). The default is |
| Displays the Export button in the title bar. The default is |
| Overrides the report height. Enter a numeric value. |
| Overrides the report width. Enter a numeric value. |
| Sets how the report is initially displayed. To display the report initially as a table, set the parameter to The default is Note: This parameter is ignored for reports that do not have table and chart. |
| Scales the report table to the width of the enclosing element. The default is |
| Enables users to switch between a chart and table display. The default is |
| (Required) The Remedy Smart Reporting user name to authenticate when loading the report. Set this parameter with the Setting this parameter avoids the need for users to enter their login details before viewing restricted reports. |
| (Required) The password of the user in Remedy Smart Reporting. Set this parameter with the |
| A web service token to authenticate a user when loading the report. |
clientOrg | The name of the client org. |
Examples
The following example includes a report and sets the dimensions of the report:
<script src="http://localhost/JsAPI?reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63&width=500&height=350&username=<reportingUser>.com.au&password=test&clientOrg=bmc" type="text/javascript"></script>
The following example uses an existing element in which to display the report:
<div id="myReportDiv" style="background: blue; width: 500px; height: 350px">
<script src="http://localhost/JsAPI?reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63&elementId=myReportDiv&username=<reportingUser>.com.au&password=test&clientOrg=bmc"type="text/javascript"></script>
</div>
The following example uses an existing element in which to display the report, overrides the report dimensions, and changes some of the initial display options:
<div id="myReportDiv" style="background: blue; width: 500px; height: 350px">
<script src="http://localhost/JsAPI?reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63&elementId=myReportDiv&width=400&height=300&showFilters=false&display=table&username=<reportingUser>.com.au&password=test&clientOrg=bmc"type="text/javascript"></script>
</div>
Comments
Log in or register to comment.