Build ad-hoc reports with the visual query builder, visualize data with Highcharts, and export to CSV, Excel, PDF, or JSON.
The CEF Core report builder provides two paths to generating reports: pre-built templates for common use cases and a visual query builder for fully custom analysis. All reports support interactive Highcharts visualizations, tabular data views, and multi-format export.
Reports are served by the /api/v1/reports backend service. Every executed report returns a structured response containing the result rows, total row count, execution time in milliseconds, and a suggested chart type for visualization.
CEF Core ships with categorized report templates that cover the most common reporting needs. Navigate to Reports in the sidebar to see the full template library.
Active loans summary, delinquency aging, maturity schedule, interest income by period, and loan concentration analysis.
Investor notes outstanding, interest accrued, maturity calendar, and rate distribution.
Balance sheet, income statement, trial balance, and cash flow statement generated from the general ledger.
Growth trends, portfolio risk metrics, borrower demographics, and fee income analysis.
POST /api/v1/reports/templates/:id/execute with your parameters. Results appear in a data table below the chart.rowCount, executionTimeMs, and a chartType suggestion. The chart renders automatically above the table.For reports that go beyond the pre-built templates, the visual query builder lets you construct custom queries without writing SQL. The builder walks you through table selection, field picking, filter configuration, and join definitions.
The builder fetches available tables from GET /api/v1/reports/metadata/tables. Tables are organized by schema (loans, investor_notes, gl, cash, escrow, fees, crm). Select your primary table, then optionally add related tables to join.
After selecting a table, the builder loads its fields via GET /api/v1/reports/metadata/tables/:id/fields. Each field shows its name, data type, and whether it is nullable. Check the fields you want in your report output. You can reorder columns by dragging.
Click Add Filter to constrain results. Each filter consists of a field, an operator (equals, not equals, greater than, less than, between, contains, is null, is not null), and a value. Multiple filters combine with AND logic. Date fields show a date picker, numeric fields show a number input, and text fields show a text input.
If you selected multiple tables, the builder loads relationships from GET /api/v1/reports/metadata/tables/:id/relationships and suggests foreign key joins automatically. You can accept the suggested joins or configure them manually by selecting the join type (INNER, LEFT, RIGHT) and the matching columns.
Before running, click Preview SQL to see the generated query. The builder calls POST /api/v1/reports/query/validate to check for syntax errors, missing joins, or unauthorized table access. Once validated, click Execute which calls POST /api/v1/reports/query/execute and renders the results.
Important: The query builder enforces row limits and execution timeouts to protect the database. Queries returning more than 10,000 rows are paginated. Queries exceeding 30 seconds are cancelled automatically. Add filters to narrow your results if you hit these limits.
CEF Core uses Highcharts for interactive report visualizations. Every executed report can be rendered as a chart. The backend suggests a chartType based on the data shape, but you can override it from the chart toolbar.
Best for comparing discrete categories. Use for loan counts by status, fee income by type, or borrower distribution by region. Supports stacked and grouped variants.
Best for trends over time. Use for portfolio growth, interest income by month, or delinquency rate changes. Supports multiple series and data point tooltips.
Best for showing proportions of a whole. Use for loan type distribution, notes by maturity bucket, or asset allocation breakdown. Supports drill-down on click.
Best for cumulative or stacked time series. Use for total outstanding balances over time, cash flow trends, or cumulative interest earned. Supports stacked and percentage variants.
When your report includes a date column, the chart automatically enables time series mode. You can configure the date column used for the x-axis, the aggregation interval (daily, weekly, monthly, quarterly, yearly), and whether to show cumulative or per-period values. Select the date column from the Time Axis dropdown in the chart toolbar.
Pro Tip: Click any data point on a chart to drill down into the underlying rows. The table below the chart filters automatically to show only the records represented by that data point.
Every report, whether from a template or the query builder, can be exported to four formats. Click the Export button in the report toolbar and select your format. The system calls POST /api/v1/reports/templates/:id/export (for templates) or POST /api/v1/reports/:id/export (for saved reports) with the requested format.
| Format | File Extension | Details |
|---|---|---|
| CSV | .csv | Comma-separated values. Opens in any spreadsheet application. Best for data imports and programmatic processing. |
| Excel | .xlsx | Formatted workbook with bold column headers, auto-sized columns, number formatting for currency fields, and a summary row where applicable. |
.pdf | Formatted document with report title, generation timestamp, parameter summary, data table, and optional chart image. Suitable for board presentations and auditor requests. | |
| JSON | .json | Raw JSON array of result objects. Includes metadata (row count, execution time, column definitions). Ideal for API integrations and custom processing. |
Pro Tip: Excel exports preserve number formatting. Currency columns appear with dollar signs and two decimal places. Date columns use the ISO 8601 format for reliable sorting.
Save any report configuration for quick re-execution. Saved reports preserve your selected fields, filters, parameters, chart settings, and export preferences so you can re-run them with a single click.
report_name (required) and the query_config is captured automatically. The system calls POST /api/v1/reports/reports.GET /api/v1/reports/reports with optional query parameters for category, tags, search, and favorites.POST /api/v1/reports/reports/:id/execute with the saved parameters. You can modify parameters before running without changing the saved version.PUT /api/v1/reports/reports/:id). Click Delete to remove it permanently (DELETE /api/v1/reports/reports/:id). You can only delete reports you own.Note: Saved reports belong to the user who created them. Other users cannot see or modify your reports unless you explicitly share them. See the Sharing section below for details.
Share saved reports with specific users or entire roles. Sharing lets team members run the same report without re-creating it, and gives administrators visibility into reports used across the organization.
POST /api/v1/reports/reports/:id/share with the list of users, roles, and their permissions.Pro Tip: Share a report with the TREASURY role to give all treasury staff access without adding each user individually. When new treasury users are added to the system, they automatically receive access to role-shared reports.
All report endpoints require JWT authentication. Use the authFetch helper from @/lib/auth-fetch for frontend calls.
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/reports/templates | List all report templates, grouped by category |
POST | /api/v1/reports/templates/:id/execute | Execute a template with parameters; returns data, rowCount, executionTimeMs, chartType |
POST | /api/v1/reports/templates/:id/export | Export template results to CSV, Excel, PDF, or JSON |
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/reports/metadata/tables | List available tables for reporting (by schema) |
GET | /api/v1/reports/metadata/tables/:id/fields | List fields for a table (name, type, nullable) |
GET | /api/v1/reports/metadata/tables/:id/relationships | List foreign key relationships and suggested joins |
POST | /api/v1/reports/query/validate | Validate a query config before execution |
POST | /api/v1/reports/query/execute | Execute a custom query and return results |
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/reports/reports | List saved reports (filter by category, tags, search, favorites) |
POST | /api/v1/reports/reports | Create a saved report (requires report_name, query_config) |
PUT | /api/v1/reports/reports/:id | Update a saved report (name, tags, query_config) |
DELETE | /api/v1/reports/reports/:id | Delete a saved report (ownership required) |
POST | /api/v1/reports/reports/:id/execute | Execute a saved report with its stored parameters |
POST | /api/v1/reports/reports/:id/export | Export a saved report to CSV, Excel, PDF, or JSON |
POST | /api/v1/reports/reports/:id/share | Share a report with users or roles (view/edit/delete permissions) |
Now that you understand the report builder, explore financial statements generated from the general ledger, or learn about tie-out procedures for month-end reconciliation.