KBUBComm.Reports 0.1.2

dotnet add package KBUBComm.Reports --version 0.1.2
                    
NuGet\Install-Package KBUBComm.Reports -Version 0.1.2
                    
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="KBUBComm.Reports" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KBUBComm.Reports" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="KBUBComm.Reports" />
                    
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 KBUBComm.Reports --version 0.1.2
                    
#r "nuget: KBUBComm.Reports, 0.1.2"
                    
#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 KBUBComm.Reports@0.1.2
                    
#: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=KBUBComm.Reports&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=KBUBComm.Reports&version=0.1.2
                    
Install as a Cake Tool

KBUBComm.Reports

Simple report builder wrapper for CSV, JSON, XML, and TXT output.

This package is intentionally small. It is built for the common KBUBComm pattern:

var result = await ReportBuilder.BuildBasicTextReportAsync(
    "AlarmReport_[FileTimestamp].csv",
    payload,
    ReportType.Csv);

Basic reports

Basic reports infer a wide table from CSV, JSON arrays, simple XML lists, or TXT lines.

var result = await ReportBuilder.BuildBasicTextReportAsync(
    "history.csv",
    payload,
    ReportType.Csv,
    new ReportFormatOptions
    {
        CanCreateDirectories = true,
        FileNameTimestampFormat = "yyyy-MM-dd_HHmmss",
        TimestampFormat = "yyyy-MM-dd HH:mm:ss",
        NullValueText = "NULL",
        BooleanHandling = ReportBooleanHandling.TrueFalseTitleCase
    },
    new BasicReportOptions
    {
        InputKind = ReportInputKind.Auto,
        TableShape = ReportTableShape.Wide,
        ColumnSort = ["Timestamp", "HA", "HB", "HC"]
    });

ColumnSort is a basic-only column ordering/filtering helper. When it is null, empty, or only contains blank values, the input column order is preserved. When it has values and the input has rows, only those existing input columns are included, in the requested order. Column names are matched case-insensitively before name replacements are applied.

When the input has zero rows and ColumnSort is provided, ColumnSort is treated as the intended header list so header-only reports can still be generated. This is useful for scheduled reports where no records were returned but the customer still expects a correctly shaped file.

Tall reports are intentionally advanced-only because they require observation grouping.

Advanced reports

Advanced reports map columns by source keys. JSON and XML payloads are flattened with dot paths.

var options = new AdvancedReportOptions
{
    TableShape = ReportTableShape.Wide,
    Columns =
    [
        ReportColumnMap.FromPath("Timestamp", "timestamp", ReportValueType.DateTime),
        ReportColumnMap.FromPath("Tag", "tagPath"),
        ReportColumnMap.FromPath("Value", "value"),
        ReportColumnMap.FromPath("Quality", "quality")
    ]
};

var result = await ReportBuilder.BuildAdvancedTextReportAsync(
    "alarms.csv",
    payload,
    ReportType.Csv,
    options);

Tall advanced reports use groups:

var options = new AdvancedReportOptions
{
    TableShape = ReportTableShape.Tall,
    TallGroups =
    [
        new ReportTallGroup
        {
            GroupName = "HA",
            Columns =
            [
                ReportColumnMap.FromPath("Timestamp", "timestamp", ReportValueType.DateTime),
                ReportColumnMap.FromLiteral("Tag", "HA"),
                ReportColumnMap.FromPath("Value", "ha.value"),
                ReportColumnMap.FromPath("Quality", "ha.quality")
            ]
        }
    ]
};

Filename tokens

Supported filename tokens:

  • [FileTimestamp]
  • [ReportTimestamp]
  • [DataStartTime]
  • [DataEndTime]
  • [ReportName]

Output formats

Core v1 supports:

  • ReportType.Csv
  • ReportType.Json
  • ReportType.Xml
  • ReportType.Txt

ReportType.Xlsx, ReportType.Docx, and ReportType.Pdf are known values reserved for future grouped packages.

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

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.2 119 6/24/2026
0.1.1 117 6/23/2026
0.1.0 122 6/23/2026