Configuring HTML Components in the Report Builder

When you add a HTML component to a report, you must configure the appearance using HTML.

Before You Begin

Procedure

  1. Log on to the Web Consoleand click Reports.

    The Reports page appears.

  2. From the navigation pane, click Configuration > Reports, and in the row for the report, under Actions, click Edit.

  3. Optional: If your report has multiple pages, click the tab for the page that you want to edit.

  4. From the Visualizations tab, drag Html to the Drop components to build the report box.

  5. From the Data Sets list, drag an alphabetic-type field name to the Drop Data Columns box.

    html_drop_data

    By default, nothing appears in the chart.

  6. You can drop multiple field names into the Drop Data Columns box to plot additional information in the chart.

  7. Select the component, on the Properties tab, click General properties_general, and configure any of the settings.

    Configure the component settings under General:

    • To name the HTML component, in the Chart Title box, type a name for the component.

    • To configure a different ID for the HTML component, in the ID box, type a new identifier for the component.

    • To hide the header information, select Hide Header.

    • To specify who can view the HTML component, from the Visible list, select any one of the following:

    • All: To allow everyone see the component, select this option.

    • CommCell Admin: To allow only CommCell administrators see the component, select this option.

    • Tenant Admin: To allow only only tenant administrators see the component, select this option.

    • Custom: To allow users see the component based on the permissions, select this option, then in the Visible Expression box, enter a JavaScript statement.

      For example, to allow MSP users see the component, in the Visible Expression box, enter := return cv.isMspUser.

  8. On the Properties tab, click Fields fields_tab, and configure any of the settings under Field Name:

    • To change the identifier for the field, in the ID box, type another field name.

    • To specify the type of numeric value to display for the field, in the Aggregate list, select one of the available options, such as Count or Avg.

    • To remove the field from the HTML component, click Remove Measure remove_measure.

  9. To configure the appearance of the HTML component, on the Properties tab, click Custom Code custom_code_tab:

    • In the Html Content box, enter HTML code.

      For example:

      :=
       var html="<table class=\"table\"><thead><tr><th>Error Code</th><th>Description</th></tr></thead><tbody>"
       for(var obj in rows){
       var rowObj = rows[obj];
       html = html + "<tr>"
       for(var prop in rowObj){
       if(prop === "ErrorCode"){
       html = html + "<td><a target='_blank' href='http://kb.commvault.com/#!/?q=%22"+rowObj[prop]+"%22'>" + rowObj[prop]+"</a></td>"
       }else{
       html = html + "<td>" + rowObj[prop]+"</td>"
       }
       }
       html = html + "</tr>" ; 
       }
       html = html + "</tbody></table>" ;
       return html;

    This image is an example of the HTML component with HTML Content configured:

    html_component_properties

  10. To save this version of your report specification in the Reports Manager, at the top of the Report Builder page, click Save.

  11. To make the report available to end users on the Reports page, at the top of the page, click Deploy.

Loading...