Checking or preparing a report for query results comparison from LQE relational store


Report query results can be compared only if the ordering of results is well-defined and fully specified. For example, a report on work items linked to implemented requirements must define at least one unique Sort column for work items and requirements. Sorting on title often works well because that automatically includes a sort on its URL. When all resources of some artifact type have an ID, that might also be a good Sort column. Check if the report has sufficient Sort columns to deliver results if its ordering is uniquely defined by the sort columns, and if not, change the sorting to fully define the sort order. Date or time fields are not good candidates for unique sorting because there is no guarantee that all artifacts of some type have unique timestamps to a resolution of a millisecond.


Even when a report has well-defined sort criteria, comparison might not be possible if the report results are truncated. By default, Report Builder only shows the first 3000 results. There are several cases where the ordering that is delivered from an LQE relational store might be different from that delivered from SPARQL:

  • Optional properties in which the column values are null or empty.
  • Identifiers on ETM artifacts.

If you have a report that has truncated results (for instance, more than 3000 results), then ensure that the sorting is not specified on columns that are optional or on ETM artifact IDs, or change the report to deliver fewer than 3000 results.

What if query results comparison reports an error?

Before submitting a defect, check whether the issue is not caused by:

  • Inadequate or non-unique sorting
  • Truncation
If query results comparison fails, the status bar includes a Download button. Download the error report and attach it to the submitted work item.