DocWright.Reporting.Viewer 1.1.4

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

DocWright.Reporting.Viewer

The viewer surface for DocWright reports: an HTML + inline-SVG projection of a paginated report, a JSON region map a viewer binds to, and the services a viewer needs over that model — hit-testing, action resolution, full-text search, toggling with incremental re-pagination, and a design-time preview.

It reads the same ReportPageModel that produces the PDF and the page images, so a preview and an export cannot paginate differently.

Install

dotnet add package DocWright.Reporting.Viewer

You will also want DocWright.Reporting (the model, the expression engine, processing and pagination) and DocWright.Reporting.Rdl to read .rdl files.

Projecting a report

using DocWright.Fonts;
using DocWright.Reporting.Pagination;
using DocWright.Reporting.Viewer;

ReportPageModel pages = ReportPaginator.Paginate(instance, new FontEngine());

ReportHtmlProjection projection = ReportHtmlRenderer.Project(pages, new ReportHtmlOptions
{
    Output = ReportHtmlOutput.Document,
});

File.WriteAllText("report.html", projection.Html);
File.WriteAllText("report-regions.json", projection.RegionMap.ToJson());

An item's box, background and borders are positioned elements; text and everything that draws itself — a chart, a gauge, a barcode — are inline SVG, because SVG's y is the baseline while a browser places an HTML inline box's baseline using whatever font it substituted. Each run carries textLength, so a substituted font changes the glyphs and not the geometry.

Security

A report definition is untrusted input and the consumer of this output is a browser. The projection escapes every interpolated value, writes no script and no event handlers, and writes a link only when the URL's scheme is http, https, mailto or absent altogether — a javascript: or data: target is refused (DXP9501) and carried in the region map marked as not navigable, for a host with its own policy to decide.

Viewer services

ReportHitTestResult? hit = ReportHitTest.At(pages.Pages[0], x, y);
ReportActionTarget where = ReportActionResolver.Resolve(pages, hit!.Action!);

ReportSearchIndex index = ReportSearchIndex.Build(pages);
IReadOnlyList<ReportSearchHit> found = index.Find("revenue");

var session = new ReportViewerSession(instance, fonts);
ReportViewerUpdate update = session.Toggle(toggleKey);   // update.ChangedPages says what to redraw

Interactive sort is applied by processing, not by the session: a textbox that offers one is on the page model and in the region map so a viewer can show the affordance, and reordering a data region is processing rather than pagination. The viewer puts a ReportInteractiveSort naming the textbox in ReportRunOptions.InteractiveSorts, processes the report again, and opens a new session over the new instance.

Requirements

.NET Framework 4.8, .NET Standard 2.0, .NET 8.0 or .NET 10.0. Depends on DocWright.Reporting; no third-party dependencies.

Documentation

📖 DocWright documentation · Show reports in a browser · API reference: DocWright.Reporting.Viewer

Contact

Questions, support or licensing: salwan@albahadly.com · www.albahadly.com

License

MIT. See LICENSE and THIRD-PARTY-NOTICES.md in the package.

Product 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 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. 
.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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.1.4 72 9/28/2026
1.1.3 77 9/28/2026

Guides, tutorials and API reference: https://docs.albahadly.com/docwright/