Fajfield.Reports
0.1.0
dotnet add package Fajfield.Reports --version 0.1.0
NuGet\Install-Package Fajfield.Reports -Version 0.1.0
<PackageReference Include="Fajfield.Reports" Version="0.1.0" />
<PackageVersion Include="Fajfield.Reports" Version="0.1.0" />
<PackageReference Include="Fajfield.Reports" />
paket add Fajfield.Reports --version 0.1.0
#r "nuget: Fajfield.Reports, 0.1.0"
#:package Fajfield.Reports@0.1.0
#addin nuget:?package=Fajfield.Reports&version=0.1.0
#tool nuget:?package=Fajfield.Reports&version=0.1.0
Fajfield.Reports for .NET
Render invoices, statements and multi-page reports to PDF from .NET: ASP.NET Core, ASP.NET MVC on .NET Framework, WinForms, WPF, worker services. Design the template in the free Fajfield report designer, export it as .fjt, and render it with your data.
An RDLC / Crystal Reports alternative that runs anywhere: no ReportViewer, no Windows-only runtime, no license fee. Tables continue across pages with the header repeated, groups get subtotals, text boxes grow, and "Page 2 of 5" is always right.
The package talks to a Fajfield report server you run yourself (Docker or Node), so your data stays on your network. It works on .NET Framework 4.6.1+ and .NET 6/8+, with no dependencies.
Install
dotnet add package Fajfield.Reports
Start a report server once, on any machine your app can reach:
docker run -p 8080:8080 -e API_KEYS=change-me -v ./templates:/templates fajfield/reports-server
Render a report
using Fajfield.Reports;
var reports = new ReportClient("http://localhost:8080", "change-me");
byte[] pdf = await reports.RenderAsync("invoice", new
{
Company = new { Name = "Harbour Foods Co." },
Customer = new { Name = order.Customer.Name, Address = order.Customer.Address },
Invoice = new { No = order.Number, Date = order.Date },
Items = order.Lines.Select(l => new { l.Name, l.Qty, Rate = l.Price, TaxRate = 0.05m }),
});
- Template: the name of a template stored on the server (
"invoice"), a path to a.fjtfile, or the template's JSON. - Data: one property per dataset: lists for rows, objects for single records. Anonymous objects, classes, records and dictionaries all work. Property names become camelCase (
InvoiceNo→invoiceNo) to match the designer; setreports.Naming = PropertyNaming.AsIsto keep them as declared. Already have JSON? Pass the string, or wrap it innew RawJson(json). decimal,DateTime(dates without a time are sent asyyyy-MM-dd),DateOnly,Guidand enums are converted for you.
ASP.NET Core
builder.Services.AddSingleton(new ReportClient(builder.Configuration["Reports:Url"], builder.Configuration["Reports:Key"]));
app.MapGet("/invoices/{id}.pdf", async (int id, ReportClient reports, Db db) =>
Results.File(await reports.RenderAsync("invoice", await db.InvoiceData(id)), "application/pdf"));
ASP.NET MVC (.NET Framework)
public async Task<ActionResult> Invoice(int id)
{
var pdf = await Reports.RenderAsync("invoice", InvoiceData(id));
return File(pdf, "application/pdf", $"INV-{id}.pdf");
}
Create one ReportClient and reuse it; it is safe to share between threads. You can also pass your own HttpClient (for example from IHttpClientFactory).
Warnings and errors
var r = await reports.RenderResultAsync("invoice", data);
// r.Pdf, r.Pages, r.Warnings e.g. "No data for \"customer\". Pass it as data: { customer: { ... } }."
Problems the report can live with (missing data, bad barcode data) come back in Warnings; the PDF is still made. Real errors throw ReportException with a plain message and Status: 400 bad request or template, 401 wrong API key, 404 unknown template, 413 too large, 504 too slow, 0 server not reachable.
Settings
new ReportClient() with no arguments reads FAJFIELD_REPORTS_URL (default http://localhost:8080) and FAJFIELD_REPORTS_KEY from the environment.
Also from Fajfield
Report designer · Report server · JavaScript · Python · Flutter
MIT license. Made by Fajfield: research and development for ERP, warehouse, POS and business data.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 90 | 11/30/2026 |