DigitalDoor.Reporting.Helpers
1.18.1
dotnet add package DigitalDoor.Reporting.Helpers --version 1.18.1
NuGet\Install-Package DigitalDoor.Reporting.Helpers -Version 1.18.1
<PackageReference Include="DigitalDoor.Reporting.Helpers" Version="1.18.1" />
<PackageVersion Include="DigitalDoor.Reporting.Helpers" Version="1.18.1" />
<PackageReference Include="DigitalDoor.Reporting.Helpers" />
paket add DigitalDoor.Reporting.Helpers --version 1.18.1
#r "nuget: DigitalDoor.Reporting.Helpers, 1.18.1"
#:package DigitalDoor.Reporting.Helpers@1.18.1
#addin nuget:?package=DigitalDoor.Reporting.Helpers&version=1.18.1
#tool nuget:?package=DigitalDoor.Reporting.Helpers&version=1.18.1
DigitalDoor.Reporting
Using DigitalDoor Reporting to create ViewModel and use to export in PDF or use in DigitalDoor.Reporting.Blazor to preview in HTML.
How to use:
Install nuget
reporting services (backend and/or frond end)
dotnet add package DigitalDoor.Reporting.Extensions
front end
dotnet add package DigitalDoor.Reporting.Blazor
Register the services
services.AddReportingPdfServices();
Create a report ViewModel
Create object page setup
Setup reportSetUp = new(PageSize.A4, Orientation.Portrait);
Setup Header, Body and Footer (header and footer is not required, default all document it's a Body)
reportSetUp.Header = new Section(new Format(210, 70));
reportSetUp.Body = new Section()
{
Format = new Format()
{
Dimension = new Dimension(210, 222), //full body size
},
Row = new Row() //define size per each element to iterate
{
Dimension = new Dimension(89, 18)
}
};
reportSetUp.Footer = new Section(new Format(210, 7.3));
Add columns (elements) to each section
reportSetUp.Header.AddColumn(new ColumnSetup()
{
Format = new(165, 6) { FontDetails = new Font(new Shade(13)), Position = new(3, 7) },
DataColumn = Item.SetItem<Model>(p => p.Name)
});
reportSetUp.Body.AddColumn(new ColumnSetup()
{
Format = new(165, 6) { FontDetails = new Font(new Shade(13)), Position = new(3, 7) },
DataColumn = Item.SetItem<Model>(p => p.Name)
});
reportSetUp.Footer.AddColumn(new ColumnSetup()
{
Format = new(165, 6) { FontDetails = new Font(new Shade(13)), Position = new(3, 7) },
DataColumn = Item.SetItem<Model>(p => p.Name)
});
Add data to the collection. Data will be loop in a foreach to render the report
List<Model> content = new List<Model>(await Repository.GetModelData());
List<ColumnData> data = new List<ColumnData>();
int row = 1; //define first row in the section
if(content.Any())
{
//header data
data.Add(new ColumnData() { Section = SectionType.Header, Column = Item.SetItem<Model>(p => p.Name), Value = content.Name, Row = row });
// more row data then increment row++
//body data
row = 1; //reset row
foreach(PackByTrolley item in content)
{
data.Add(new ColumnData() { Section = SectionType.Body, Column = Item.SetItem<Model>(p => p.Name), Value = content.Name, Row = row });
row++;
}
//footer data
row = 1; //reset row
data.Add(new ColumnData() { Section = SectionType.Footer, Column = Item.SetItem<Model>(p => p.Name), Value = content.Name, Row = row });
}
Full class example
public class CreateReportHandler
{
readonly IReportsOutputPort Output; //from digitalDoor.Reporting.Entities, registered by services.AddReportsServices();
readonly IGetDataRepository Repository;
public GetReportHandler(IReportsOutputPort output, IGetDataRepository repository)
{
Output = output;
Repository = repository;
}
public async ValueTask Handle()
{
Setup reportSetUp = new(PageSize.A4, Orientation.Portrait);
reportSetUp.Header.AddColumn(new ColumnSetup()
{
Format = new(165, 6) { FontDetails = new Font(new Shade(13)), Position = new(3, 7) },
DataColumn = Item.SetItem<Model>(p => p.Name)
});
reportSetUp.Body.AddColumn(new ColumnSetup()
{
Format = new(165, 6) { FontDetails = new Font(new Shade(13)), Position = new(3, 7) },
DataColumn = Item.SetItem<Model>(p => p.Name)
});
reportSetUp.Footer.AddColumn(new ColumnSetup()
{
Format = new(165, 6) { FontDetails = new Font(new Shade(13)), Position = new(3, 7) },
DataColumn = Item.SetItem<Model>(p => p.Name)
});
List<Model> content = new List<Model>(await Repository.GetModelData());
List<ColumnData> data = new List<ColumnData>();
int row = 1; //define first row in the section
if(content.Any())
{
//header data
data.Add(new ColumnData() { Section = SectionType.Header, Column = Item.SetItem<Model>(p => p.Name), Value = content.Name, Row = row });
// more row data then increment row++
//body data
row = 1; //reset row
foreach(PackByTrolley item in content)
{
data.Add(new ColumnData() { Section = SectionType.Body, Column = Item.SetItem<Model>(p => p.Name), Value = content.Name, Row = row });
row++;
}
//footer data
row = 1; //reset row
data.Add(new ColumnData() { Section = SectionType.Footer, Column = Item.SetItem<Model>(p => p.Name), Value = content.Name, Row = row });
}
else
{
reportSetUp = new();
}
await Output.Handle(reportSetUp, data); //create ReportViewModel in a property IReportsOutputPort.Content
}
}
Using report component
<ReportView ReportModel=ReportModel ShowPreview=true />
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. 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 is compatible. 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 is compatible. 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. |
-
net10.0
- DigitalDoor.Reporting.Entities (>= 1.18.1)
- SkiaSharp (>= 4.153.0)
- Svg.Skia (>= 5.2.3)
-
net6.0
- DigitalDoor.Reporting.Entities (>= 1.18.1)
- SkiaSharp (>= 4.153.0)
- Svg.Skia (>= 5.2.3)
-
net8.0
- DigitalDoor.Reporting.Entities (>= 1.18.1)
- SkiaSharp (>= 4.153.0)
- Svg.Skia (>= 5.2.3)
-
net9.0
- DigitalDoor.Reporting.Entities (>= 1.18.1)
- SkiaSharp (>= 4.153.0)
- Svg.Skia (>= 5.2.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DigitalDoor.Reporting.Helpers:
| Package | Downloads |
|---|---|
|
DigitalDoor.Reporting
Generate reports from code using clean architecture. Can be used in .NET Core application like backend API, in Blazor Server, Blazor Web Assembly, MVC... |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.18.1 | 227 | 9/30/2026 |
| 1.18.0 | 202 | 9/29/2026 |
| 1.17.71 | 621 | 12/16/2025 |
| 1.17.70 | 753 | 12/15/2025 |
| 1.16.61 | 406 | 10/22/2025 |
| 1.16.60 | 446 | 6/1/2025 |
| 1.16.59 | 424 | 11/2/2024 |
| 1.16.58 | 383 | 10/10/2024 |
| 1.16.57 | 399 | 6/7/2024 |
| 1.14.53 | 565 | 5/11/2024 |
| 1.14.52 | 453 | 3/19/2024 |
| 1.14.50 | 595 | 11/22/2023 |
| 1.12.43 | 1,021 | 8/25/2023 |
| 0.7.21 | 613 | 7/28/2022 |
2026-09-30: Update SkiaSharp to 4.153.0 and Svg.Skia to 5.2.3, the same versions used by DigitalDoor.Reporting.Presenters.PDF. Update DigitalDoor.Reporting.Entities to 1.18.1.
2026-09-29: SVG and SKPicture values are kept as vector SVG (Images.TryGetSvg). Byte arrays with base64 text are decoded. Images.TryGetImageBytes no longer hides errors: only malformed SVG returns false, other exceptions are thrown. Encoding to an unsupported format throws InvalidOperationException.
2025-12-15: Add support to detect SVG images and convert in bytes[].
2025-12-15: Add support Net 10. Update dependencies.
2025-10-22: Update dependencies.
2025-06-01: Update license. Add Support Net 9. Update dependencies removing exclusive Windows usage.
2024-11-02: Add ColorTranslator, CssColor, MeasurementConverter and RrgColors helpers.
2024-10-10: Update version all nugets.
2024-07-06: Update version all nugets.
2024-11-05: Update version all nugets.
2023-12-12: Change version to keep same version all nugets.
2023-11-22: Update frameworks target to NET 6 and NET 8.