Cosmic Module

O

Qubits of DPK

March 23, 2026

Core Open Source

What This Module Is (Big Picture)

The reporting module allows administrators to generate reports from system data.
Banks need reports for:
  • financial statements
  • loan performance
  • customer activity
  • operational metrics
  • regulatory reporting
Instead of writing queries manually each time, the system stores predefined reports that can be executed when needed.

Layman Example

A bank manager wants to see all active loans for the branch.
Instead of checking each loan individually, the manager runs a report.
Example report output:
The fineract-reporting module generates these reports.

Where the Code Lives

Key Package

org.apache.fineract.infrastructure.report
Responsibilities include:
  • storing report definitions
  • executing report queries
  • generating report results
  • exporting reports

Core Domain Entity:

Report.java

Path
fineract-reporting/src/main/java/org/apache/fineract/infrastructure/report/domain/Report.java
This entity represents a stored report definition.

Key fields on

Report

Report Query Model

Reports are built using SQL queries.
Example query
sql
QUBITS OF DPK
1SELECT id, client_id, principal_amount
2FROM m_loan
3WHERE loan_status = 'ACTIVE';
This query retrieves all active loans.
The reporting module executes these queries and returns the results.

Report Parameters

Reports may accept parameters.
Example:
Branch ID
Date Range
Loan Status
Example query with parameters
sql
QUBITS OF DPK
1SELECT id, client_id, principal_amount
2FROM m_loan
3WHERE office_id = :officeId
4AND disbursement_date >= :startDate;
The system replaces parameters before running the query.

Example Report Execution Code

java
QUBITS OF DPK
1public List<Map<String, Object>> runReport(String query) {
2
3    return jdbcTemplate.queryForList(query);
4}
This executes the report query and returns results.

API Layer

Main controller
ReportsApiResource
Example endpoints
plain text
QUBITS OF DPK
1GET  /v1/reports
2GET  /v1/reports/{reportName}
3POST /v1/reports
4PUT  /v1/reports/{reportId}
5DELETE /v1/reports/{reportId}
These APIs allow administrators to:
  • create reports
  • execute reports
  • retrieve report results
  • update report definitions

Read Services

Read services retrieve report information.
Examples include:
  • retrieving report definitions
  • retrieving report results
  • retrieving available report parameters
These services power dashboards and reporting tools.

Write Services

Write services manage report configuration.
Responsibilities include:
  • creating report definitions
  • updating report queries
  • deleting reports

Repository Layer

Exceptions

These ensure reports are properly configured.

How It All Connects (Full Flow)

Example: Generating a loan report
java
QUBITS OF DPK
1Admin UI
2Run report
34ReportsApiResource
56ReportService
7Retrieve SQL query
89Database
10Execute query
1112Report results returned

Why This Module Matters

Reporting helps financial institutions:
  • monitor loan performance
  • track financial activity
  • produce regulatory reports
  • analyze operational data
It enables data-driven decision making.

One-Sentence Summary

fineract-reporting provides reporting capabilities that allow administrators to generate operational and financial reports from system data.