How fastreports/fastreport works
1. This repository is a multi-project .NET reporting platform, not a single app. The center of the architecture is the FastReport engine plus a set of optional integrations, demos, and packaging tooling around it.
2. The core runtime is split into layered libraries:
- FastReport.Base holds the main report object model, bands, pages, data abstractions, engine, exports, preview, utilities, barcode/matrix/table/gauge objects, and script support.
- FastReport.OpenSource provides the open-source-specific surface area and platform adjustments.
- FastReport.Compat supplies compatibility shims for APIs that differ across .NET targets.
These layers separate the reusable report engine from target-specific concerns.
3. The main data flow in the library is: report template or report code -> report object model -> engine processes bands/data -> prepared pages -> preview/export. That pipeline is reflected in the Report, ReportEngine, PreparedPages, Preview, and Export areas.
4. Reports can be defined in several ways, and the repo supports all of them:
- template files such as .frx and .fpx
- XML-based report definitions
- report creation from code
The Demos/Reports folder and the code-based demos show how the same engine consumes different report inputs.
5. Data access is a major subsystem. FastReport.Base/Data contains core data-source abstractions for tables, views, parameters, relations, XML, CSV, JSON, and business objects. The Extras/Core/FastReport.Data/* projects extend that model with concrete connectors for databases and external stores such as SQL Server, MySQL, PostgreSQL, Oracle, SQLite, MongoDB, RavenDB, Couchbase, Elasticsearch, Cassandra, Firebird, ODBC, Excel, Google Sheets, and others.
6. The report engine itself is template-agnostic and datasource-agnostic. It receives registered data sources, resolves parameters and relations, executes scripting, and builds a prepared document. That separation is what allows the same engine to be reused in console apps, MVC/SPA apps, and desktop viewers.
7. Exporting is modular. FastReport.Base/Export contains shared export infrastructure and HTML/image export. Optional export plugins live under Extras/OpenSource/FastReport.OpenSource.Export.PdfSimple, which adds simple PDF generation without changing the core engine. The architecture is clearly plugin-oriented: the core prepares pages, then a selected exporter renders them into a target format.
8. The web stack is its own subsystem in FastReport.Core.Web. It provides:
- ASP.NET Core controllers for preview, export, print, dialogs, resources, and designer operations
- application services for report handling, exports, connections, text editing, and designer utilities
- web UI templates and static scripts/styles under FastReport.Web.Base
This layer adapts the core reporting engine to browser-based preview/designer workflows.
9. Several demo applications illustrate the supported deployment shapes:
- console apps for data binding, code-generated reports, user functions, and PDF export
- ASP.NET MVC samples for server-side rendering and database-backed reporting
- SPA samples with React, Vue, and Angular frontends talking to ASP.NET Core backends
- an Avalonia viewer sample in Demos/OpenSource/Extra
These demos are important because they show the integration boundary between host app, report engine, and data source.
10. There is a strong separation between reusable shared code and sample code. Demos/OpenSource/_Shared contains helper services used across demos, while the rest of Demos is mostly scenario-specific sample hosting. This keeps the demo apps thin and emphasizes the core library APIs.
11. The repository also includes testing and documentation infrastructure:
- Tools/FastReport.Tests.OpenSource for library tests
- Tools/FastReport.OpenSource.Documentation for DocFX-based docs
- Pack for build/package scripts and NuGet packaging metadata
These are supporting systems rather than runtime dependencies, but they define how the library is validated and distributed.
12. Resource and localization content is part of the product surface. FastReport/Resources contains built-in report samples, icons, styles, and report assets, while Localization stores translated UI strings. These resources feed the designer/runtime experience and are packaged with the library.
13. Architecturally, the repo is organized around extensibility points: new data connectors, exports, report objects, and web integrations can be added without rewriting the engine. The core engine stays small and reusable, while the extras/projects extend it through assemblies and plugins.
Main entry points: Report.cs Report runtime · FastReport.Base FastReport.Base · FastReport.Core.Web FastReport.Core.Web · Data Data model
Components 21
Core libraries
Reusable reporting engine and platform layers
- FastReport.Base · Main report object model, engine, preview, export, data, objects, and utilities
FastReport.Base - FastReport.OpenSource · Open-source-specific surface area and platform adjustments over the base engine
FastReport.OpenSource - FastReport.Compat · Cross-target compatibility abstractions and replacements
FastReport.Compat - Report runtime · Report, engine, prepared pages, and preview workflow
FastReport.Base/Report.cs - Data model · Core data sources, relations, parameters, and connections used by the engine
FastReport.Base/Data - Core exports · Common export infrastructure plus HTML and image export implementations
FastReport.Base/Export - Built-in assets · Embedded sample reports, icons, styles, and designer/runtime assets
FastReport/Resources
Web stack
Browser-facing preview, designer, and UI resources
- FastReport.Core.Web · ASP.NET Core controllers, services, caching, and web-report orchestration
FastReport.Core.Web - Web UI base · Shared web templates, scripts, styles, and localization for preview/designer UI
FastReport.Web.Base
Extensions
Optional connectors and exporters
- PDF Simple · Optional PDF export plugin built on the core export pipeline
Extras/OpenSource/FastReport.OpenSource.Export.PdfSimple/FastReport.OpenSource.Export.PdfSimple - Data connectors · Optional database and external-store connectors extending the core data layer
Extras/Core/FastReport.Data - Report Builder · Fluent report construction helpers and definitions for code-generated reports
Extras/OpenSource/FastReport.ReportBuilder/FastReport.ReportBuilder
Demos
Sample hosts and report scenarios
- Report demos · Template-based report examples and scenario coverage
Demos/Reports - Console demos · Console apps showing data binding, code-generated reports, user functions, and PDF export
Demos/OpenSource/Console apps - MVC demos · ASP.NET MVC samples for server-side preview and database-backed reporting
Demos/OpenSource/MVC - SPA demos · React, Vue, and Angular frontends paired with ASP.NET Core reporting backends
Demos/OpenSource/SPA - Shared demo code · Reusable demo utilities and data services shared across sample apps
Demos/OpenSource/_Shared
Tooling
Tests, docs, and packaging
- Pack scripts · Build scripts, package metadata, and NuGet packaging orchestration
Pack - OpenSource tests · Automated tests for the open-source libraries and exporters
Tools/FastReport.Tests.OpenSource - OpenSource docs · DocFX documentation project for the open-source distribution
Tools/FastReport.OpenSource.Documentation - Localization · Translated UI strings and localized designer/runtime resources
Localization
Connections 27
- FastReport.OpenSource → FastReport.Base: extends · Adds open-source-specific behavior on top of the shared engine
- FastReport.OpenSource → FastReport.Compat: adapts · Uses compatibility shims for target-specific APIs
- Report runtime → Data model: reads data · Engine resolves parameters, relations, and registered data sources
- Report runtime → Core exports: prepares output · Prepared pages are handed to exporters after report processing
- FastReport.Base → Report runtime: contains · The core runtime lives in the base library
- FastReport.Base → Data model: contains · Core data abstractions are part of the base library
- FastReport.Base → Core exports: contains · Shared export infrastructure is implemented in the base library
- PDF Simple → Core exports: plugins into · Optional PDF exporter plugs into the shared export layer
- Data connectors → Data model: extends · Concrete connectors implement the core data source model
- FastReport.Core.Web → Report runtime: drives · Web controllers and services invoke the report engine for preview, print, and export
- FastReport.Core.Web → Web UI base: renders · Backend serves shared templates and browser assets for the web experience
- FastReport.Core.Web → Core exports: exports · Web layer routes export requests through the core export pipeline
- Web UI base → Built-in assets: uses assets · UI includes shared scripts, styles, and resource files
- Report demos → Report runtime: exercises · Template examples demonstrate the engine with report files and XML definitions
- Console demos → Report runtime: hosts · Console samples instantiate and run the reporting engine
- Console demos → Data model: binds data · Console samples demonstrate datasets, business objects, and XML input
- MVC demos → FastReport.Core.Web: hosts · MVC samples integrate the reporting backend into server-side apps
- SPA demos → FastReport.Core.Web: hosts · SPA samples connect browser frontends to the web reporting backend
- Shared demo code → Console demos: supports · Shared helpers reduce duplication across demos
- Report Builder → Report runtime: builds reports · Fluent helpers generate reports for the same core engine
- OpenSource tests → FastReport.Base: verifies · Tests cover core library behavior and selected extensions
- OpenSource tests → PDF Simple: verifies · Exporter tests validate PDF generation
- OpenSource docs → FastReport.OpenSource: documents · Documentation targets the open-source distribution
- Pack scripts → FastReport.Base: packages · Build scripts assemble and publish library artifacts
- Pack scripts → Localization: packages · Packaging includes localization assets
- Built-in assets → Report runtime: feeds · Built-in samples and assets are available to the runtime and designer
- Localization → Web UI base: localizes · Translated strings support browser UI and designer surfaces