Reports
This document covers the desktop client's report subsystem: the ReportType enum that defines all supported reports, the ReportGroup categories, the AbstractReportUserInterface base class, individual report implementations, and the ReportGenerationHelper that drives report generation.
Module Location
All desktop-side report classes live in:
suredms-desktop-client/src/main/java/com/sureclinical/suredms/report/
The ReportType enum and shared context types live in:
suredms-report/src/main/java/com/sureclinical/suredms/report/context/
ReportGroup — Report Category Groupings
ReportGroup is an enum that groups reports by functional area and ties each group to a feature flag constant:
| Group | Feature flag |
|---|---|
ADMINISTRATION | FEATURE_GLOBAL_ADMINISTRATIVE_REPORTS |
CONTENT | FEATURE_GLOBAL_CONTENT_REPORTS |
NETWORK | (no feature gate) |
MANAGEMENT | "EDIT_PROJECT_REPORTS" |
QUALITY | FEATURE_SURE_QMS_EDIT_QUALITY_MANAGEMENT_REPORTS |
OTHER | (no feature gate) |
Reports only appear in the UI if the associated feature group is enabled for the current user's license and configuration.
ReportType — All Report Definitions
ReportType is an enum in suredms-report. Each value declares a display name, a short description, whether it is a server-only (web) report (serverOnly=true), an optional UI implementation class name, and its ReportGroup.
Administration group
| Enum value | Display name | UI class |
|---|---|---|
BARCODE_COVER_SHEET | Barcode Cover Sheet | ReportBarcodeCoverSheetType |
SYSTEM_USER_BY_INSTANCE | System Users By Instance | ReportSystemUsersByInstance |
ARCHIVES_BY_INSTANCE | Archives By Instance | (server-only) |
PROJECTS_BY_INSTANCE | Projects By Instance | (server-only) |
SYSTEM_USER_BY_ARCHIVE | System Users By Archive | (server-only) |
SYSTEM_USER_BY_LICENSE | System Users By License | (server-only) |
ORGANIZATIONS_BY_ARCHIVE | Organizations By Archive | ReportOrganizationsByArchive |
USER_AUDIT_TRAIL | User Audit Trail | ReportUserAuditTrail |
USER_ACCESS_BY_ARCHIVE | User Access By Archive | ReportUserAccessByArchive |
USER_GROUPS | User Groups | (server-only) |
CONTACTS_BY_ARCHIVE | Persons By Archive | ReportPersonsByArchive |
SIGNING_AUDIT_TRAIL | Signing Audit Trail | ReportSigningHistoryAuditTrail ¹ |
USER_ROLE | User Roles | ReportUserRoles |
APPLICATION_ROLE | Application Roles | ReportApplicationRoles |
TRAINING_CERTIFICATES | Training Certificates | ReportTrainingCertificate |
¹ In suredms-desktop-client-signing.
Content group
| Enum value | Display name | UI class |
|---|---|---|
CONTENT_BY_QUALITY_CHECK | Documents by Quality Check Status | ReportDocumentsByQualityCheck |
CONTENT_MODEL | Content Model | ReportContentModelType |
DISCREPANCY_REPORT | Discrepancy Report | ReportDocumentDiscrepancy |
SIGNATURE_VALIDATION | Signature Validation Report | ReportSignatureValidation ¹ |
WORKFLOWS_PLATFORM | Workflow Report | WorkflowReportData ² |
ARCHIVE_AUDIT | Audit Report | ReportArchiveAudit |
ARCHIVE_MANIFEST | Export Archive Manifest Report | ReportDocumentsAdvanced |
FILE_MIGRATION | Documents Migration Report | (server-only) |
SITE_MONITOR_CHECKS | Site Monitor Checks Report | (server-only) |
SHARED_DOCUMENT_BY_SITE | Shared Documents by Site Report | (server-only) |
¹ In suredms-desktop-client-signing.
² In suredms-workflow-platform.
Other group
| Enum value | Display name | UI class |
|---|---|---|
CONTENT_BY_CONTENT_TYPE | Documents By Content Type | ReportDocumentsAdvanced |
CONTENT_BY_ORGANIZATION | Documents By Organization | ReportDocumentsAdvanced |
CONTENT_BY_ORGANIZATION_ROLE | Documents By Organization Role | ReportDocumentsAdvanced |
CONTENT_BY_PERSON | Documents By Person | ReportDocumentsAdvanced |
CONTENT_BY_PERSON_ROLE | Documents By Person Role | ReportDocumentsAdvanced |
CONTENT_BY_SITE | Documents By Site | ReportDocumentsAdvanced |
CONTENT_BY_STUDY_SUBJECT_AND_VISIT_NUMBER | Documents By Study Subject and Visit Number | ReportDocumentsAdvanced |
CONTENT_BY_EXPIRATION_DATE | Expiring Document Report | ReportDocumentsExpirationDate |
DOCUMENT_COMPLETENESS | Document Completeness | ReportDocumentCompleteness |
MISSING_DOCUMENTS | Missing Documents | ReportMissingDocuments |
CONTENT_BY_MILESTONE | Documents By Milestone | ReportDocumentsByMilestone |
CONTENT_ADVANCED | Custom Document Report | ReportDocumentsAdvanced |
INCOMPLETE_WORKFLOWS_PLATFORM | Incomplete Workflow Report | IncompleteWorkflowReportData ² |
PAYMENT_VOUCHER | Payment Voucher | (server-only) |
PROTOCOL_DEVIATION | Protocol Deviation Report | (server-only) |
MONITOR_VISIT | Monitor Visit | (server-only) |
² In suredms-workflow-platform.
Management group (server-only)
| Enum value | Display name |
|---|---|
PROJECT_UPDATE | Project Update Report |
PROJECT_MILESTONES | Project Milestones Report |
PROJECT_ACTIVITIES_AND_TASKS | Project Activities and Tasks Report |
PROJECT_ACTION_ITEMS | Project Action Items Report |
STUDY_SUBJECT_PROCEDURE_PLAN | Study Subject Procedure Plan Report |
PAYMENTS | Payments Report |
ESSENTIAL_DOCUMENTS | Essential Documents Report |
PROTOCOL_DEVIATIONS | Protocol Deviations Report |
SERIOUS_ADVERSE_EVENTS | Serious Adverse Events Report |
SITE_STATUS_HISTORY | Site Status History Report |
STUDY_SUBJECTS | Study Subjects Report |
STUDY_SUBJECT_STATUS_SUMMARY | Study Subject Status Summary Report |
MONITOR_VISITS | Monitor Visits Report |
STUDY_SUBJECT_METRICS_VISITS | Study Subject Visit Metrics Report |
Quality group
| Enum value | Display name | Server-only |
|---|---|---|
QUIZ_RESULT | Quiz Result Report | No |
CONTROLLED_DOCUMENTS | Controlled Documents Report | Yes |
TRAINING_COURSES | Training Courses Report | Yes |
TRAINING_COURSE_STATUS | Training Course Status Report | Yes |
TRAINING | Training Report | Yes |
TRAINING_MATRIX | Training Matrix Report | Yes |
QUALITY_EVENTS | Quality Events Report | Yes |
AbstractReportUserInterface
Located at:
suredms-desktop-client/src/main/java/com/sureclinical/suredms/report/AbstractReportUserInterface.java
This is the abstract base class for all report UI panels. It extends AbstractProgressJob, which means it also acts as a background Job that runs in JobManager — report generation executes off the EDT.
Key responsibilities
- Stores the
ReportTypeand theReportWizardContext. - Provides
createReportContentPanel(), which builds the standard report panel layout: a report name text field at the top, report-specific content in the middle, and orientation/page format controls at the bottom. - Each subclass implements
getReportContentPanel()(required) andgetReportContentComponent()(optional) to supply the filter/selection controls specific to that report type. - Exposes
run()(fromAbstractProgressJob) which drives PDF generation viaReportGenerationHelper.
Panel layout
Reports use MigLayout with a three-section vertical layout:
| Section | Content |
|---|---|
| North | Report name text field (JTrimTextField) |
| Center | Report-specific content component (tree, filters, checkboxes) |
| South | (optional) Orientation and page format controls (ReportOrientationPanel) |
AbstractTreeReport
Most content reports extend AbstractTreeReport, which itself extends AbstractReportUserInterface. It provides:
- A
GadgetDocNav-based document tree for archive/folder/document selection. - A
DocNavSelectionPanelfor applying selection filters (e.g., content type filter, status filter). - Integration with
DocNavViewModeto control tree display mode.
Subclasses override createSelectionFilterPanel() to add report-specific filter widgets (e.g., status checkboxes in ReportDocumentDiscrepancy).
Individual Report Implementations
ReportDocumentsAdvanced
Used for many CONTENT_BY_* reports and CONTENT_ADVANCED. Provides column selection, organization/person/milestone filter panels dynamically based on the ReportType. The most broadly reused implementation.
ReportDocumentDiscrepancy
Filters the document tree by discrepancy status (DS_OPEN / DS_CLOSED). Uses QualityService to fetch List<DocDiscrepancy> per document and applies open/closed checkbox filters.
ReportQualityCompliance
Reports on required content type coverage across selected archives. ReportMissingDocuments is a direct subclass that applies a missing-only filter on the same data.
ReportDocumentCompleteness
Extends ReportQualityCompliance to add document-level completeness status (whether all required metadata is filled).
ReportArchiveAudit
Shows archive-level audit events (create, update, lock, export). Data source is the audit trail for each selected archive.
ReportUserAuditTrail
Filters audit events by user identity. Builds a date range selector and optional username filter.
ReportUserAccessByArchive
Shows which users have access to which archives and at what role level. Uses team management data from EntityDataSource.
ReportBarcodeCoverSheetType
Generates a barcode cover sheet PDF. Works with BarcodeFactory to determine barcode format and BarcodeWriter to render the barcode image.
ReportOrganizationsByArchive / ReportPersonsByArchive
List all organizations or persons registered within each selected archive, including their roles.
ReportSystemUsersByInstance
System-wide user report across all archives. Shows user status, license type, and last login.
ReportGenerationHelper
Located at:
suredms-desktop-client/src/main/java/com/sureclinical/suredms/report/ReportGenerationHelper.java
ReportGenerationHelper.generateReport() is the single entry point for all report generation. It:
- Calls
ReportUtils.getReportObjectIds(reportWizardContext.getReportContext())to determine the selected document or entity IDs. - Builds a
ReportContextvia its builder, forwarding all filter, sorting, format, logo, watermark, page orientation, and pagination settings fromReportWizardContext. - Calls
ReportUtils.generateReport(reportContext, reportWizardContext)— this produces aDocument(the PDF report stored in Nuxeo). - Reloads the new report entity via
DocumentUpdater.reloadEntityImmediately()and fires an endpoint data event. - On the EDT, optionally navigates to the created report by calling
ReportCallback.onReportCreated(report).
ReportContext — key settings
| Setting | Controls |
|---|---|
reportDefinition | JasperReports template definition |
objectIds | IDs of the entities to include in the report |
selectedColumns | Column visibility for tabular reports |
filterExpression | JNLP-style filter predicate |
sortFields | Sort ordering |
parameters | Arbitrary key-value parameters passed to JasperReports |
pageOrientation | Portrait or landscape |
pageFormat | A4, Letter, etc. |
fitPageWidth | Scale content to page width |
condensed | Condensed row spacing |
logoImage / watermarkImage | Organisation branding for reports |
maxRows | Maximum result rows |
Report Filtering Tree
Located at:
suredms-desktop-client/src/main/java/com/sureclinical/suredms/report/filtering/
| Class | Purpose |
|---|---|
ReportFilteringTree | JTree subclass for visually selecting archives, folders, and documents to include in a report |
ReportFilteringTreeNodeEditor | In-place tree node editor for selection checkboxes |
ReportFilteringTreeNodeRenderer | Custom renderer for selected/unselected/partially-selected nodes |
ReportFilteringUtils | Utility methods for extracting selected node IDs from the tree |
Report Orientation Panel
ReportOrientationPanel is a small utility panel (also in suredms-desktop-client/report/) that provides:
- Portrait / Landscape toggle buttons.
- Page format selector (A4, Letter).
- Optional condensed-layout checkbox.
It is embedded at the bottom of AbstractReportUserInterface.createReportContentPanel() for all non-trivial reports.
Signing and Workflow Reports
Two report types are implemented outside the main suredms-desktop-client report package:
| Report | Module | Class |
|---|---|---|
SIGNING_AUDIT_TRAIL | suredms-desktop-client-signing | ReportSigningHistoryAuditTrail |
SIGNATURE_VALIDATION | suredms-desktop-client-signing | ReportSignatureValidation |
WORKFLOWS_PLATFORM | suredms-workflow-platform | WorkflowReportData |
INCOMPLETE_WORKFLOWS_PLATFORM | suredms-workflow-platform | IncompleteWorkflowReportData |
These are discovered at runtime because ReportType stores the UI class name as a string and uses reflection to instantiate it.