This documentation supports the 9.1 version of Remedy IT Service Management Suite.

To view the latest version, select the version from the Product version menu.

Embedding report content in external pages

(From BMC Remedy Smart Reporting version 9.1.03) Using the Javascript API, BMC Remedy Smart Reporting reports and dashboards can be embedded into external webpages, which can be hosted on a separate web server to BMC Remedy Smart Reporting. The browser that you are using should be able to access the BMC Remedy Smart Reporting server.

The HTML page can include multiple reports; however each separate report may only be displayed once on each page.

Note

Multiple dashboards on a single page are not currently supported.

Interactive elements such as Drill Through, Drill Down, User Prompt Filters, Series Selection, and Export to PDF are available.

The following topics explain more about the embedding report option:

Displaying reports and dashboards

This section explains the features related to displaying reports and dashboards.

Report

The embedded report contains a title bar and the report itself. The title bar contains the name of the report, as well as buttons to control any interactive elements used on the report. The interactive features include:

Description

Displays basic report information including Name, Description, Last Modified Date, Category, Sub Category, and Current User.

Displays the Javascript used to embed the report.

Allows you to toggle to Chart view if the Table and Chart display is used.

Allows you to toggle to Table view if the Table and Chart display is used.

Opens the panel of User Prompt Filters that are enabled on the report.

Opens a Series Selection panel, if the Visible Series Selection option is enabled.

Opens a Unit Selection panel, if the Visible Units Selection option is enabled.

Opens a Page Navigation panel, if the report contains multiple pages.

Opens a Section Navigation panel, if the report contains sections.

Opens the GIS Map Navigation panel, if the map has Hover Navigation enabled.

Opens the Export panel, allowing the user to export the report to various formats, including:

  •  CSV
  •  DOC
  •  PDF
  •  Rich Text Format
  •  Text
  •  XLS

Dashboard

The embedded dashboard contains a title bar for the entire dashboard. Each of the dashboard reports (displayed the same as embedded reports), are laid out the same way as they are when viewed through the Smart Reporting front end.

Note

Dashboard filters and KPI dashboards are supported.

Description

Displays the basic dashboard information including Name, Description, Last Modified Date, and Current User.

Displays the Javascript used to embed the dashboard.

Opens a panel of User Prompt Filters enabled on the dashboard.

Opens the Export panel, allowing the user to export the dashboard to various formats, including:

  •  CSV
  •  DOC
  •  PDF
  •  Rich Text Format
  •  XLS

Embedding a report

Follow the steps given below to create the Javascript code, which identifies the report to load, for use in your HTML page, wiki, or blog.

  1. Log in to BMC Remedy AR System as a system administrator.
  2. Create a service user with the minimum read access to the report that you are embedding.

    Note

    Make sure that this user is synced in BMC Remedy Smart Reporting and has access to the report that you are embedding.

  3. Log in to BMC Remedy Smart Reporting as a system administrator.
  4. Change the password of the service user created in Step 2 above in BMC Remedy Smart Reporting.
  5. Open the report that you want to embed.
  6. From the report URL, copy the report UUID and the clientOrg name (highlighted in bold in the following example).
    For example, http://<Smart Reporting server name>:<port>/RunReport.i4;b9669409-3cf8-4290-b914-e742778e0ab1=58455c98-7b84-4c20-9ffb-fc0ba6dd8c00?reportUUID=eb363c0e-71bf-47b1-898b-dc5068dd0ff6&primaryOrg=1&clientOrg=bmc&width=500&height=500.
  7. On the HTML page where you want to embed the report, in the following standard script tag:

    1. Replace the existing report UUID and the clientOrg with the copied report UUID and the clientOrg name respectively.

    2. Replace the existing username and password with the user name and password of the service user that you have created.

      <script src="http://localhost/JsAPI?
      reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63&width=500&
      height=350&username=<serviceUser>&password=test&
      clientOrg=bmc" type="text/javascript"></script>

      Note:

      The password must be in plain text and cannot be encrypted. If you want to hide the credentials of the user, generate an authentication token by using the Yellowfin webservices and pass this authentication token in the script. For more information, see Basic usage of reports and dashboards.

  8. Save the HTML page and deploy this page in the web server. For example, Tomcat.
  9. Access this HTML page in a web browser to view the embedded report.

    Note

    If the following error message is displayed, refresh the page to display the report:

    A connection could not be established to the source database

Where to go from here

Set the required parameters and see the examples documented in the Basic usage of reports and dashboards section. 

User access

Authentication details can be passed to the API when the dashboard or report is loaded, either by passing a username and password, or authenticating via web services and passing the login token o the API. This allows you to use a specific user to load content rather than requiring the user to enter their details. For more information, see Basic usage of reports and dashboards.

When a report or dashboard is requested through the Javascript API, the following process is used to authenticate the user:

  • If the user authentication details are passed to the API when a dashboard or report is loaded, they will be used to log the user in.
  • If the user is already logged in to the Javascript API on the page, the existing login session is used.
  • If the user has previously logged in to the Javascript API, they are automatically logged in with the same account.

When the above process is complete, there are several cases that will not result in the user immediately loading the requested content:

  • If none of the above conditions are met, the user cannot be logged in, and they will be prompted to enter their Smart Reporting username and password manually.
  • If the above process results in the user being authenticated, but the user does not have access to the requested content, an appropriate error message will be displayed.

When you, as a user, enter your Smart Reporting username and password to log in to the Javascript API, a cookie is stored in your browser to remember your login information. The next time you visit a page that includes a report or dashboard embedded using the Javascript API, you will automatically be logged in again using the same user. This ensures that you will not need to enter your details every time you request a report or dashboard. By default, the cookie is valid for seven days from the last time you log in. This period can be changed by setting the External API cookie timeout value through Administration > Configuration > System > General Settings. To disable the cookie altogether, set the value to 0.

Note

The cookie value is stored in the browser is encrypted. When Smart Reporting is restarted, all users will be required to log in again.

Limitations

The following are the limitations of the embed option:

  • You can add multiple reports to a single HTML page. However, each report can only be included once per page.
  • Only one dashboard is supported per HTML page.
  • The calendar selector for date filters is not available.
  • The Drill Anywhere option is not available.
  • The Saved Filter Sets option is not available.
  • The Chart Animation option is not available.
  • The Chart level summaries are not display correctly.
Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Scott Philben

    I have Remedy, SmartReporting, and RSSO 9.1.04. I want my users to be able to click a link and show a report without having to log in or go through Remedy MidTier. The above seemed to be the answer but I can't get it to work. no matter what username I use in the script, i always get a login/password page. And then it doesn't even let me log in. Can you post a complete html page example in case I am doing something wrong? What else will make it stop asking me to log in?

    Thanks.

    Aug 01, 2018 01:01
    1. Vrishali namdev Galinde

      Hi Scott,

      The user in the script is a Smart Reporting user. So ensure that this user is present in Smart Reporting and update the user's password in Smart Reporting, and then use those credentials in the script.


      Hope this helps.

      Regards,

      Vrishali


      Sep 21, 2018 05:45
  2. Mike Green

    I notice the example script has a plain password. Any way of obfuscating the password on the script?

    Jun 11, 2019 02:58
    1. Vrishali namdev Galinde

      Hello Mike,

      The password must be in plain text and cannot be encrypted currently. If you want to hide the credentials of the user, generate an authentication token by using the Yellowfin webservices and pass this authentication token in the script. For more information, see Basic usage of reports and dashboards.

      I have updated the documentation mentioning the same.


      Thanks & Regards,

      Vrishali

      Jun 20, 2019 12:40