Generating JavaScript for embedding a report or dashboard


Perform the following steps to create the JavaScript code that identifies the report to load and use in your HTML page, wiki, or blog.

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

    Note

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

  3. Log in to Remedy Smart Reporting as a system administrator.
  4. Change the password of the service user created in step 2.
  5. Open the report that you want to embed.
  6. From the report URL, copy the report UUID and the clientOrg name, that are highlighted in bold in the following example:
    http://RemedySmartReportingServerName: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.
  1. On the HTML page where you want to embed the report, complete the following steps in the standard script tag:
    1. Replace the existing report UUID and the clientOrg with the copied report UUID and the clientOrg name, respectively.
    1. Replace the existing user name 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 then pass the authentication token in the script. For more information, see Basic-embedded-report-JavaScript-parameters-and-examples and Basic-embedded-dashboard-JavaScript-parameters-and-examples.

  1. Save the HTML page and deploy this page in the web server.
  2. To view the embedded report, open the HTML page in a web browser.

    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

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*