ReportSummaryTables.xml

All reportable objects that are built as summary tables in the database are defined in this file. In this file, you can define a summary table name, define a display name, give a detailed description, specify the SQL query that is used to build the summary table, and define indexes on the summary table.

Summary tables are similar to views but with important differences:

  • The data retrieved using views is the latest data in the database. The summary table, therefore, is current when it is built, but does not reflect changes made since that time. The summary tables in RiskVision are updated by a scheduled job named “Report Summary Builder”. By default, this scheduled job runs once a day.
  • The reports that are based on summary tables run faster than the reports based on views.

If you want to build a summary table with the SQL that is the same as the one used to build the view in the previous example, the content will look like this (assuming there is only one summary table in the file):

<?xml version="1.0"?>

<ReportSummaryTables version="1">

<ReportSummaryTable name="agls_archived_assessments">

 <Description>

  <![CDATA[

This summary table is used for creating reports on archived assessments.

  ]]>

 </Description>

  <Definition>

 <![CDATA[

SELECT a.entity_id,

 a.name ,

 a.organization ,

  rap.compliance_score,

  rap.risk_score ,

 rap.end_date

FROM agl_entity a

 INNER JOIN agl_raproject rap

  ON rap.entity_id = a.entity_id

WHERE rap.archived =1

  ]]>

  </Definition>

  <Indexes>

 <Index>

  CREATE INDEX aglx_archived_assessments_name on agls_archived_assessments (name)

  </Index>

  </Indexes>

  </ReportSummaryTable>

</ReportSummaryTables>