Create a report:

This article assumes you are familiar with the basics of writing custom reports in Spira.
In this example we will build a custom report with custom ESQL section.

To create the report you need to:

  1. Go to Administration  > Edit Reports
  2. Click on Create a new Report (at the bottom of the list of existing Reports)
  3. Specify HTML format (the dynamic elements won't work in Word/PDF/Excel)
  4. Choose to add a Custom Section:

SQL Query:

5. Click Add New Custom Section and then
6. Copy and paste the below simple query to pull some incident information into the Query section of the window displayed:

SELECT
    I.INCIDENT_ID,
    I.NAME AS IncidentName,
    I.INCIDENT_STATUS_NAME,
    I.INCIDENT_TYPE_NAME,
    I.PRIORITY_NAME
FROM
    SpiraTestEntities.R_Incidents AS I

7. You can click Preview Results button to see the sample of the results.

8. If you will click on Generate Default Template button, you will get a plain report. It will be a five-column table with incident info: IncidentID, Incident Name, its status, type and priority and that will also work for reporting purposes after saving changes.

9.