Editing or Creating an Ad Hoc Report in Report Writer

The Query Builder is an intuitive interface that replaces the Report Writer, which will eventually be removed from the Cority application. In the interim, you can use either module and any queries/reports will appear in both. For more information, see Editing or Creating an Ad Hoc Report in Query Builder.

  1. In the Business Intelligence menu, click Report Writer.

  2. Click a link to edit an existing custom report, or click New.

  3. Only the author, and users granted appropriate permission, may edit or delete custom reports. If you do not have such permission and make any changes to a custom report, when you save you are prompted to enter a different report name. Alternatively, you can create an exact copy of the report with “Copy” at the end of the report name, as described in Using Existing Ad Hoc Reports.
    The Dependent Objects field on the Details tab lists all object types (e.g. business rule, letter template, dashboard views, custom metrics, etc.) that reference the report. Each object type is a clickable link that allows you to open the the object to unlink or modify it before editing or deleting the report. If the object is another Report Writer report, it will appear in the Dependent Objects list only if you are permitted to view it.

    To export a report’s configuration as a JSON file, choose Actions»Export Report Configurations. Conversely, you can import a JSON file to create a report. An administrator can migrate reports from one environment to another; see Migrating Configurations. All reports will be created as new records

  4. On the Details tab, enter the following information:

    RPTwriter_details.gif
  5. If you have appropriate permissions, you may specify multiple entities to combine data. System performance will be affected if you make a large report that joins many entities. Select the additional Entity, then identify what fields should be matched to be included in the query. First select the Child Matching Fields; that is, one or more fields from the additional entity you just added. Then select the Parent Matching Field; that is, one or more fields from any entity above the entity you just added. For each child entity, indicate if all parent records should be included or only matching records.

    For example, to create a report that presents lost and restricted work days, add the IncidentOshaCountsCubeByMonthTemp and Case Master entities, then join them using the Case ID for the Parent Matching Field.

    If you change the Entity of a previously saved report, settings on the remaining tabs will be cleared. If you change only the Child Matching Field or Parent Matching Field, the Field Selection and Criteria tabs will retain their selections.

    If you are creating a subquery that will be joined with another subquery in a new report but there is no common field to join them, create an “Arithmetic” field with a value of 1 in each subquery.

    For reports that were created prior to 2018.3, the check box will be unselected. If a report is used as a subquery in another report, the data in each report will be filtered according to their respective Site Security settings.

    If you want to filter the subquery by a field value that is not in the main source entity on the Details tab, select the Filter Entity. Then on the Criteria tab add a filter (for an integer, number or string field type), select the “Is Filtered By” operator and select a field from the Filter Entity. A business rule configured to trigger on condition of this subquery will fire only for the configured field filter. (Note: The data preview on the Data tab will show the data unfiltered by this condition because the report won't be filtered by that condition until the business rule is triggered.)

    When a Report Writer report uses a subquery, that report cannot be used as a subquery in another report. When a report is being used as a subquery, that report cannot be edited.

  6. On the Fields Selection tab, select the fields that you want to include on the report:

    RPTwriter_fields.gif
  7. If you are creating a Distribution List of
    - employees: one of the columns must be Employee #
    - Cority users: one of the columns must be Login Name
    - email addresses: one of the columns must be Email Address.

    If you are creating a subquery for use in a custom measure:
    - the first column must be a number field (e.g. Amount)
    - the second column must be a date/time field
    - subsequent columns must be the GDDLOFB ID fields, in that order)
    Note that the Subquery field is not available on default custom measure layouts.

    The calculation field is added to the Field Selection list, hyperlinked to allow for editing. Calculation fields are treated the same as other fields in Report Writer queries (e.g. as criterion, for selection in visualization, included in the dashboard, etc.). If a calculated field is edited or deleted, any criteria (on the Criteria tab) that uses the calculated field will be deleted automatically from the report.

    Calculation fields inherit the security configured for the fields used to create them. For example, a user will not be able to view data generated by a calculation field if the field was created using another field that is prohibited from the user.
    If a field is prohibited from a role, any calculated fields that are based on that field will not be available on the Criteria tab. If a report has a calculated field that is based on a prohibited field, the value of the calculated field will be masked using the “XXXX” format.

  8. On the Criteria tab, define how the data should be filtered, sorted, grouped, and how/if totals will be included.

    RPTwriter_criteria.gif
  9. In the Criteria (after aggregation) section, define filters for any fields identified (on the Fields Selection tab) with an aggregation type.

    Anything configured in the Criteria section will be applied to the report query before any aggregation and associated grouping is performed. Anything configured in the Criteria (after aggregation) section will be applied after any aggregation and associated grouping is performed.

    If this is a subquery and you want to filter by a field value that is not in the main source entity, select the Filter Entity on the Details tab, then on the Criteria tab add a filter (for an integer, number or string field type), select the “Is Filtered By” operator and select a field from the Filter Entity.

    If you are defining a subquery for use in a LettersTemplate, you can limit the letter to only include data related to the record the letter is sent from. In the Criteria section, select a field that ends in “ID”, then in the operator field beside it, select “Equals Main Record ID”. Note that no data will be shown on the Data tab because it must be generated from a record in the application.

    The row limit is applied after data is aggregated and grouped, and will be applied wherever the report is used (e.g. in Report Scheduler, Dashboard indicators, etc.). The Row Limit overrides the default Dashboard data point limit of 12.

  10. On the Formatting tab, indicate whether to include the Company Name, the Report Confidentiality Statement, and/or the Company Logo (as defined in the system settings of the same names).

  11. Optionally, enter any further information to appear in the Page Header; this will appear above the report title but below the company logo.

    RPT_formatting.gif
  12. To see the records that match the criteria specified, click the Data tab.

    RPTwriter_data.gif
  13. Numeric field values use the format specified in the Number Style system setting, with the following exceptions:
    - For aggregation types Average, Standard Deviation, Standard Deviation Population, Variance, Variance Population, Percent of Total (Count), Percent of Total (Sum), Sum, Minimum, and Maximum, the resulting values will have a maximum of six decimal places.
    - For Count and Count Distinct aggregations, the resulting values will be formatted as whole numbers.
    - If the report is exported to CSV or Excel, any aggregation values will be formatted as raw numbers.

    Data may be hidden based on your role and security privileges.

  14. To view the data for any of the selected fields in visual form, click the Visual tab and select the presentation Type.

  15. For the “standard” chart types, the chart will use the first Field to Graph/Drill field for the x coordinates and the Value to Graph for its y coordinates. That is, the query will group by the Field to Graph, and aggregate by the Value to Graph according to the aggregation type specified. If the user drills down on a data point, it will filter by the value of that data point and then group by the next field in the Field to Graph/Drill field.
    For Pie charts, each slice will represent a distinct Field to Graph value, and the value of each slice will be generated according to what is selected for the Value to Graph.

    If the selected Field to Sort does not have an aggregation type or associated grouping, the chart will group data by the Field to Sort, which may result in what appears to be duplicate entries in the chart.

    “Circular” and “Number Only” types can be added to the Advanced Dashboard only.

    The “Injuries by Part of Body” report uses a “BodyMap” type that allows the data to be viewed as a heat map on this tab or in a dashboard indicator. For more information, see Monitoring Injuries by Part of Body on a Heat Map.

  16. If you want to save the report template for future queries, click Save. Saved queries can be scheduled for recurring generation; see Scheduling Reports.

  17. Optionally, do one of the following: