ReportGen.Core 0.1.0

dotnet add package ReportGen.Core --version 0.1.0
                    
NuGet\Install-Package ReportGen.Core -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ReportGen.Core" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ReportGen.Core" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="ReportGen.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ReportGen.Core --version 0.1.0
                    
#r "nuget: ReportGen.Core, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ReportGen.Core@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ReportGen.Core&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=ReportGen.Core&version=0.1.0
                    
Install as a Cake Tool

ReportGen

A modular, extensible .NET 8 report generation library with a fluent builder API.

CI License: MIT

Why ReportGen?

Most teams need the same report capabilities repeatedly:

  • Build tabular reports from object collections
  • Export to multiple formats (CSV, Excel — more coming)
  • Keep the API simple and strongly typed
  • Extend delivery/execution later (email, queue workers)

ReportGen provides this with a clean fluent API and package-first developer experience.

Installation

dotnet add package ReportGen.Core --version 0.1.0
dotnet add package ReportGen.Exporters --version 0.1.0

Quick Start

Fluent builder (full control)

using ReportGen.Core;
using ReportGen.Exporters;

var users = new[]
{
    new { Name = "Ava", Email = "ava@company.com", Score = 92 },
    new { Name = "Noah", Email = "noah@company.com", Score = 88 }
};

await Report.Create("User Performance")
    .From(users)                              // bind data first — T is inferred
    .AddColumn("Name", x => x.Name)
    .AddColumn("Email", x => x.Email)
    .AddColumn("Score", x => x.Score)
    .ToCsv("./reports/users.csv")
    .ToExcel("./reports/users.xlsx")
    .GenerateAsync();

Attribute-based columns (less boilerplate)

public class Employee
{
    [ReportColumn("Employee Name", Order = 0)]
    public string Name { get; set; } = "";

    [ReportColumn("Email", Order = 1)]
    public string Email { get; set; } = "";

    public string InternalId { get; set; } = "";  // excluded — no attribute
}

await Report.Create("Team Report")
    .From(employees)
    .AddColumnsFromAttributes()                    // discovers [ReportColumn] properties
    .ToCsv("team.csv")
    .GenerateAsync();

Reusable templates

var salesTemplate = ReportTemplate<Sale>.Define("Sales Report")
    .AddColumn("Product", x => x.Product)
    .AddColumn("Revenue", x => x.Revenue)
    .Build();

// Use with different data each time
await salesTemplate.From(marchData).ToCsv("march.csv").GenerateAsync();
await salesTemplate.From(aprilData, "April Sales").ToExcel("april.xlsx").GenerateAsync();

Export to a stream (ASP.NET downloads, memory, S3, ...)

// In-memory — useful for email attachments, S3 uploads, tests
using var ms = new MemoryStream();
await Report.Create("Export")
    .From(data)
    .AddColumn("Name", x => x.Name)
    .ToCsv(ms)           // or .ToExcel(ms)
    .GenerateAsync();

// ASP.NET — stream directly to browser, no temp file
Response.ContentType = "text/csv";
Response.Headers["Content-Disposition"] = "attachment; filename=report.csv";
await Report.Create("Export")
    .From(data)
    .AddColumn("Name", x => x.Name)
    .ToCsv(Response.Body)
    .GenerateAsync();

Packages

Package Description Dependencies
ReportGen.Core Contracts, fluent builder, templates, attribute discovery None
ReportGen.Exporters CSV + Excel exporters CsvHelper, ClosedXML

Roadmap

v0.1.0 — current

  • Core contracts and fluent builder
  • Attribute-based column discovery
  • Reusable report templates
  • CSV exporter — file path and stream (CsvHelper)
  • Excel exporter — file path and stream (ClosedXML)
  • Full .NET 8 type support (DateOnly, TimeOnly, Guid, short, uint, byte)
  • 73 tests (unit + integration)
  • CI pipeline
  • NuGet publish

v0.2.0

  • Dynamic column selection from a registry (whitelist-based, frontend-safe)
  • CultureInfo support on exporters (number/date formatting per locale)
  • Multi-sheet workbook support

v1.0.0

  • PDF exporter
  • Delivery abstraction (IReportDelivery — email, S3, Azure Blob)
  • Domain events (ReportRequested, ReportGenerated, ReportFailed)

v2.0

  • PDF exporter
  • Email delivery (MailKit)
  • Azure Service Bus / RabbitMQ adapters

Project Structure

ReportGen/
├── src/
│   ├── ReportGen.Core/          # Zero-dependency contracts & builder
│   └── ReportGen.Exporters/     # CSV + Excel implementations
├── tests/
│   └── ReportGen.Tests/         # xUnit + FluentAssertions
├── samples/
│   └── BasicUsage/              # Working console demo
├── docs/
│   ├── ARCHITECTURE.md          # Design decisions & ADRs
│   └── CONTRACT-DESIGN-GUIDE.md # Deep-dive into every contract
└── .github/workflows/ci.yml

Tech Stack

  • .NET 8 / C# 12
  • ClosedXML (Excel)
  • CsvHelper (CSV)
  • xUnit + FluentAssertions

Contributing

See CONTRIBUTING.md.

License

MIT

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ReportGen.Core:

Package Downloads
ReportGen.Exporters

CSV and Excel exporters for the ReportGen report generation library.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 147 4/5/2026