NETReporter.Abstractions 3.6.0

NETReporter.Abstractions

Společná rozhraní a typy knihovny NETReporter. Balíček nemá žádné závislosti na renderovacích knihovnách (QuestPDF, Roslyn, OxyPlot, ZXing), takže ho může používat kód, který report jen zadává, bez toho, aby tahal celou knihovnu.

Obsahuje:

  • IReportRenderer – vykreslení reportu z proudů šablony a dat (PDF, SVG, HTML, JSON, WebP, PNG, JPEG, stránky po jedné),
  • ITemplateTools – validace šablony a dat, datový kontrakt (TemplateDataContract) a ukázková data,
  • RenderOptions a PDF volby (PdfConformance, PdfAttachment, PdfEncryption),
  • diagnostiky (Diagnostic, BindingDiagnostic, DiagnosticCodes) a pozorovatele pipeline (IReportPipelineObserver).

Implementace jsou dvě a nahrazují se registrací v DI:

Balíček Implementace Kde se renderuje
NETReporter ReportRenderer, TemplateTools v procesu aplikace
NETReporter.Client ReportServerRenderer, ReportServerTemplateTools na serveru ReportServer, přihlášení API tokenem

Typy zůstaly ve svých jmenných prostorech (NetReporter, NetReporter.Common, NetReporter.Bindings …) a knihovna NETReporter je přeposílá (TypeForwardedTo), takže stávající kód se nemění.

Balíčky NETReporter, NETReporter.Abstractions a NETReporter.Client se vydávají společně se stejnou verzí. Seznam změn je v souboru CHANGELOG.md v balíčku.

Požadavky: .NET 10.

Showing the top 20 packages that depend on NETReporter.Abstractions.

Packages Downloads
NETReporter
Reportovaci knihovna pro generování PDF reportů z JSON šablon
62
NETReporter
Reportovaci knihovna pro generování PDF reportů z JSON šablon
9
NETReporter
Reportovaci knihovna pro generování PDF reportů z JSON šablon
8
NETReporter.Client
Tenký klient pro ReportServer: stejné rozhraní jako knihovna NETReporter (IReportRenderer, ITemplateTools), ale report se vykreslí na serveru a klient se přihlašuje API tokenem. Bez QuestPDF, Roslynu a dalších těžkých závislostí.
8
NETReporter
Reportovaci knihovna pro generování PDF reportů z JSON šablon
6
NETReporter
Reportovaci knihovna pro generování PDF reportů z JSON šablon
5
NETReporter.Client
Tenký klient pro ReportServer: stejné rozhraní jako knihovna NETReporter (IReportRenderer, ITemplateTools), ale report se vykreslí na serveru a klient se přihlašuje API tokenem. Bez QuestPDF, Roslynu a dalších těžkých závislostí.
5
NETReporter.Client
Tenký klient pro ReportServer: stejné rozhraní jako knihovna NETReporter (IReportRenderer, ITemplateTools), ale report se vykreslí na serveru a klient se přihlašuje API tokenem. Bez QuestPDF, Roslynu a dalších těžkých závislostí.
4

- **Behavior change** ReportServer (ToDo #198): the storage settings (`ReportServer:Storage:*`, in the environment `REPORTSERVER_STORAGE_*`: `Enabled`, `Provider`, `Bucket`, `Region`, `ServiceUrl`, `AccessKeyId`, `SecretAccessKey`, `SessionToken`, `Prefix`, `RenderRetentionDays`, `RenderRetentionCleanupMinutes`) are read only from the process configuration (environment variables: in the cluster the configmap and the secret) and no longer from the table `ConfigEntries`. Until now the API copied them there at its first start and the stored value won over the configuration, so a changed `REPORTSERVER_STORAGE_*` had no effect and the access keys lay in the database in plain text. The page *Config* of the web UI and the endpoints `GET/PUT /admin/config/{scope}...`, `POST /admin/config/reload` and `POST /admin/config/reseed/storage[/overwrite]` are removed, together with the contracts `ConfigEntryResponse` and `UpdateConfigEntryRequest`. A change of the settings takes a restart of the API (in the cluster a rollout). **Before updating, compare the stored values with the configuration** (`SELECT "Key", "Value" FROM "ConfigEntries" WHERE "Scope" = 'ReportServer:Storage' AND "Key" <> 'SecretAccessKey'`): the stored value was in force until now, so the behavior changes where it differs, and an access key missing from the secret turns the storage off. The table `ConfigEntries` stays because it holds state marks (the seeded bundled content, the legacy import mark); the old storage rows stay in it unused and a later migration deletes them, so a rollback to the previous image keeps working. - **Behavior change** Template editor, ReportServer web UI and account pages (ToDo #183): the user interface is available in English and Czech. The language comes from the culture cookie (the switch `CS | EN` in the user menu and the header of the editor, in the header of the web and on the account pages; `GET culture/set`, cookie on the path `/`, so one choice covers the editor, the web and the account pages), then from the browser's `Accept-Language`; Czech when neither says English. A browser that asks for English now gets the English interface where it always got Czech. All texts are `.resx` resources read through `IStringLocalizer` (Czech is the neutral resource, English the `.en.resx` next to it; the new test `LocalizationResourceTests` keeps the keys and `{0}` placeholders equal in both languages and fails on Czech text left in `.razor`, `.cshtml` and `.js`). Scripts get their texts from `window.nrI18n` (`JsStrings`, `SharedJsStrings`), the Syncfusion components get Czech texts for the controls the editor uses (`SfResources`, the uploader, dialogs, the color picker, the speech input), and the emoji picker has an English catalog (`Data/emoji-picker-en.json`, `tools/IconPacks emoji-picker` writes both). The number and date formats of the interface follow the language (Czech: `12,5`, English: `12.5`), the template JSON stays invariant. Not translated: the ReportServer API (error messages stay Czech), the diagnostics of the library (`NRP…`), prompts and replies of the AI assistant, sample templates, blocks and themes, the default template of the editor and the texts a template contains. `NetReporterUserAdministration`, `SmtpEmailSender`, `AssistantService` and a few more services take an `IStringLocalizer` (optional where tests build them by hand); `CzechIdentityErrorDescriber` is now `LocalizedIdentityErrorDescriber`; `Claim`, `Description` and `Points` of `NetReporterIdentityHostOptions` are keys of the account resource (a text without a key is shown as written). The ReportServer API answers in Czech whatever the language of the machine it runs on. - Template editor (ToDo #197) fix: the JSON editor could show the template without the node `id`s the editor had added, and selecting then went wrong (a click into the JSON selected nothing or another node, a node selected in the tree or in the preview was marked at the wrong place of the text). The editor adds an `id` to every node without one when it analyzes a loaded template, but Monaco is created asynchronously: it took its first text from the hidden `<textarea>` when it finished loading, while the component recorded the value current at that moment, so a value that arrived in between (the first analysis of the start template, typically when a draft was offered) never reached Monaco. `JsonEditor` (shared by the editor and the ReportServer UI) now passes the initial text with the create call and sends any newer value right after creating Monaco; text typed into the fallback field while Monaco loads is kept. - Template editor (ToDo #197): a paste into the JSON editor of the template (Ctrl+V) is written at once when the result is valid JSON, as when switching the tab: the analysis adds an `id` to the pasted nodes and rebuilds the tree, so a pasted template or node can be selected right away in the JSON, the tree and the preview. Before, the pasted text waited for a tab or format switch, and a template without `id`s could not be selected until then. A paste that leaves the JSON invalid (in the middle of an edit) still waits. `JsonEditor` has the new callback `OnPaste`. - **Behavior change** ReportServer (ToDo #190, migration `RemoveUserAssistantSettings`): the endpoints `GET/PUT /me/assistant-settings` and `GET/PUT/DELETE /me/assistant-keys` and their tables `UserAssistantSettings` and `UserAssistantKeys` are removed. They held the provider choice and the encrypted keys of users, which nothing has read since 3.4.0 (the owner manages the models); the migration deletes the stored keys. An editor older than 3.4.0 no longer works against this API. - Template editor (ToDo #190): an assistant run checks the model configuration with ReportServer before it starts (a conditional `GET`, `304` when nothing changed; runs started within 2 s share one request, after a failure the known configuration is used for 10 s). A model change the owner saved in another editor pod thus applies to the next run at once instead of after up to 30 s; the operations offered in the panel still refresh every 30 s. - ReportServer API and UI: command-line arguments (`--Key=value`) are part of the configuration again and take precedence over the environment variables. `UseEnvironmentVariablesOnly` dropped them together with the other default sources; it now keeps them after the environment variables, as the editor and the MCP server already did. The containers start without arguments, so a deployment does not change. - Tests (ToDo #188): the host tests (ReportServer API, template editor, MCP server) run in parallel, the full suite takes about 3 minutes instead of about 10. The test hosts pass their configuration as command-line arguments (`UseSetting` of `WebApplicationFactory`) instead of setting process environment variables under one lock, the MCP tests are no longer a serial collection, at most half the cores (2 to 8, `REPORTSERVER_TESTS_MAX_API_HOSTS`) API hosts run at once, and each API host copies its database from a migrated template (`CREATE DATABASE … TEMPLATE`) instead of running the migrations. - **Behavior change** HTML output (ToDo #195, #196): the HTML looks like the PDF, which is the reference. - Borders: `border*.width` is in points like in the PDF (it was millimetres, so `"width": 1` was about 2.8 times thicker). A border lies on the middle of the edge and takes no space, as in the PDF. A solid side is drawn as a `box-shadow` (half outside, half inside the edge) because browsers round the width of a CSS border down to whole pixels. A dashed, dotted or double side stays a CSS border, and the space it takes is subtracted from the margin and the padding of that side. - Alignment: `align` on a `Stack`, `Box` or `Absolute` no longer writes `text-align`, which the browser passed down to every descendant while the PDF does not. The children go into an inner column that shrinks to the widest child and moves left, centre or right, as in the PDF. `alignVertical` works on containers and text nodes (a flex column) instead of the `vertical-align` that had no effect on blocks. `align` (and `imageAlign`) moves images, codes and icons. - Tables: class `nr-table` (it was missing, so the base CSS never applied and cells had the browser spacing). Column weights become percentage widths with `table-layout: fixed`. The grey default grid `#ddd`, the bold centred header and the middle vertical alignment of the browser are gone. The cell padding (`cellPadding*`) is resolved as in the PDF and `rowMinHeightMm` is the cell `height` (`min-height` did nothing on a cell). - Text: the default font is Lato with line height 1.2, the PDF default. A font that the PDF renderer does not have (neither registered nor installed on the server) is left out of `font-family`, so the browser uses Lato like the PDF instead of a font that only the reader has. `lineHeight` is passed to the descendants through `--nr-lh`. `bold` is weight 600 (the PDF draws the SemiBold face), and `fontWeight` names map to numbers (`SemiBold` was invalid CSS). Spaces and line breaks in a text are kept (`white-space: pre-wrap`). Paragraphs and the body have no browser margins, links have no browser colour and underline, and a binding shown instead of its value is `#cc0000` like in the PDF. - Paragraph spans carry only text properties. The box of the paragraph (padding, border) was repeated on every span; margin and padding in a span style no longer reach the HTML either (`NRP030` and its quick fix say so). - A solid `Line` is a block as thick as the line (it took the height of a text line), a dashed one a border of a zero-height block. A `Spacer` without a height is empty. - Barcodes and 2D codes use the same SVG as the PDF (it was built in pixels, which gave another aspect ratio and quiet zone). A code with a height and no width keeps its size and stays left. - The page: on screen the body has the width of the printable area, so the text wraps like in the PDF whatever the window width. The X-ray mode of the debug HTML set this width only while switched on. In print the `@page` margins are no longer doubled by the inline margin of the body. An empty element is written with an end tag (`<div></div>`), a self-closing `<div />` swallowed the elements after it. - Debug HTML (`DebugMode`, the editor preview) shows the page as a sheet of paper centred on a grey area, at least one page high. Page layers and watermarks lie on the sheet of the first page. X-ray only adds outlines and the printable area and no longer changes the layout. - PDF: in a table cell with `rowMinHeightMm`, `cellVerticalAlign` and `alignVertical` now move the content within the whole minimum height (the minimum height was applied inside the alignment, so the text stayed at the top). - Template editor: the HTML preview gets the Lato font of the PDF from `GET preview-fonts/{face}.ttf` (the faces of the QuestPDF font archive next to the application; anonymous, CORS `*` for the sandboxed preview frame, cached for a week), so it wraps the text like the PDF even when the browser has no Lato. Celý seznam změn: CHANGELOG.md v balíčku a https://dev.azure.com/advsoft/Knihovny/_git/NetReporter?path=/src/NetReporter/CHANGELOG.md

.NET 10.0

  • No dependencies.

Version Downloads Last updated
3.9.2 4 10/28/2026
3.9.1 1 10/27/2026
3.9.0 6 10/20/2026
3.8.1 6 10/19/2026
3.8.0 4 10/19/2026
3.7.0 4 10/19/2026
3.6.0 5 10/17/2026
3.5.1 62 10/15/2026
3.5.0 4 10/15/2026
3.4.2 4 10/15/2026
3.4.0 6 10/12/2026
3.3.0 4 10/11/2026
3.2.2 4 10/10/2026
3.2.1 4 10/10/2026
3.2.0 5 10/10/2026
3.1.1 5 10/09/2026
3.1.0 4 10/09/2026
3.0.1 8 10/08/2026
3.0.0 4 10/08/2026
2.2.1 5 10/05/2026
2.2.0 6 10/05/2026
2.1.0 8 10/04/2026
2.0.1 7 10/04/2026
2.0.0 5 10/03/2026
1.7.0 4 10/03/2026