DocWright.Reporting 1.1.4

dotnet add package DocWright.Reporting --version 1.1.4
                    
NuGet\Install-Package DocWright.Reporting -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" 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" Version="1.1.4" />
                    
Directory.Packages.props
<PackageReference Include="DocWright.Reporting" />
                    
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 --version 1.1.4
                    
#r "nuget: DocWright.Reporting, 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@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&version=1.1.4
                    
Install as a Cake Addin
#tool nuget:?package=DocWright.Reporting&version=1.1.4
                    
Install as a Cake Tool

DocWright.Reporting

The report definition model, the report expression engine, report processing and pagination for DocWright: load an SSRS report definition, edit it, validate it, evaluate the expressions inside it, run it against your data and divide it into pages.

Install

dotnet add package DocWright.Reporting

To read and write .rdl files, add DocWright.Reporting.Rdl as well.

Evaluating an expression

using DocWright.Reporting.Expressions;

ReportExpression expression = ReportExpression.Parse(
    "=Format(Parameters!Amount.Value * 1.1, \"C\") & \" for \" & Parameters!Region.Label");

var context = new ReportExpressionContext();
context.Parameters["Amount"] = new ReportParameterValue(1250);
context.Parameters["Region"] = new ReportParameterValue("W", "West");

Console.WriteLine(ReportExpressionEvaluator.Evaluate(expression, context));   // $1,375.00 for West

RDL expressions are a Visual Basic dialect. DocWright interprets them — no compilation, no reflection, no code generation — with the same results on every target framework, and holds that against Microsoft's own report engine and against the Visual Basic runtime.

  • Nothing ambient. The culture comes from the context (en-US by default, as in Reporting Services), and Now() and Globals!ExecutionTime return the instant you supply — never the clock.
  • Custom code is not executed unless you supply a ReportCodeHost.
  • Bounded. Depth, step and allocation budgets are on by default, for expressions from reports you did not write.
  • Failures carry a code — DXP9101 to DXP9107 — on ReportExpressionException.

Data reaches expressions through ReportDataScope, an abstract class whose members you override for the data you have.

Running a report

ReportProcessor binds a definition to data — parameters, datasets, filters, sorts, groups, aggregates and variables — and returns a ReportInstance. Data comes from a ReportDataProvider: DocWright executes no query and opens no connection. The in-box ReportInMemoryDataProvider serves tables and object sequences you already hold.

using DocWright.Reporting;
using DocWright.Reporting.Data;
using DocWright.Reporting.Processing;
using DocWright.Reporting.Rdl;

ReportDefinition definition;
using (FileStream file = File.OpenRead("sales.rdl"))
{
    definition = new RdlReader().Read(file);
}

var sales = new ReportDataTable()
    .AddColumn("Region", typeof(string))
    .AddColumn("City", typeof(string))
    .AddColumn("Amount", typeof(decimal))
    .AddRow("W", "Perth", 1200m)
    .AddRow("W", "Broome", 300m);

var regions = new ReportObjectData<(string Code, string Name)>(new[] { ("W", "West"), ("E", "East") })
    .Column("Code", r => r.Code)
    .Column("Name", r => r.Name);

var provider = new ReportInMemoryDataProvider().Add("Sales", sales).Add("Regions", regions);

var run = new ReportRunOptions { ExecutionTime = new DateTime(2026, 9, 15, 9, 0, 0) };
run.Parameters["Region"] = new ReportParameterValue("W");

using (ReportInstance instance = ReportProcessor.Process(definition, provider, run))
{
    Console.WriteLine(instance.Evaluate("=Sum(Fields!Amount.Value, \"Sales\")"));   // 1500
}

The definition is the one USAGE.md's "Running a report" section runs: a Region parameter whose valid values come from a Regions dataset — which is why that dataset has to be supplied too, although nothing in the snippet reads it.

ReportProcessor.GetParameters answers what a parameter bar needs — each parameter's state, value and valid values — without running the report. Every rule was measured against Microsoft's report engine; row, group-instance and instance-node limits are on by default.

Paginating a report

ReportPaginator.Paginate(instance, fonts) divides a ReportInstance into a ReportPageModel: every item positioned in twips, every textbox's text laid out into lines and runs over DocWright's font engine, page headers and footers evaluated with their page numbers. ReportPaginationOptions chooses physical or interactive pages and supplies the image resolver and custom-item drawers. ReportPageModel.ToLayoutDocument() lowers the pages to the LayoutDocument DocWright's PDF and image renderers draw, and DocWright.Reporting.Export writes the same pages to Word, Excel, CSV and plain text.

The definition model

ReportDefinition is an element tree, so a load-and-save keeps everything: elements and namespaces DocWright does not model, designer-private rd: content, and the difference between a stated default and an omitted one. ReportValidator checks what the RDL schema cannot see — duplicate report-item names, and references to datasets or data sources the report does not define.

Requirements

.NET Framework 4.8, .NET Standard 2.0, .NET 8.0 or .NET 10.0. No third-party dependencies.

Documentation

📖 DocWright documentation · Tutorial: run an SSRS report · Report expressions · API reference: DocWright.Reporting

Contact

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

License

MIT.

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 (3)

Showing the top 3 NuGet packages that depend on DocWright.Reporting:

Package Downloads
DocWright.Reporting.Viewer

The viewer surface for DocWright reports: an HTML + inline-SVG projection of a paginated report page model with a JSON region map, and the services a viewer needs over that model — hit-testing, action resolution, full-text search, and toggling or sorting with incremental re-pagination. Deterministic, escaped, and driven by the same page model that produces the PDF, so a preview and an export cannot disagree.

DocWright.Reporting.Export

File exports for DocWright reports, lowered from the paginated page model: DOCX (a fixed-layout positioning grid, one section per report page, or a flow document), CSV (the report's data with the scope rules SSRS applies, not a picture of the page) and plain text. The page model is the same one the PDF and image renderers draw, so every export paginates identically.

DocWright.Reporting.Rdl

Reads and writes SSRS / Power BI paginated report definitions (.rdl, .rdlc) for DocWright, across the 2005, 2008, 2010 and 2016 schemas. Lossless in both directions: elements, attributes and namespaces DocWright does not model are preserved, so a designer can open a report, edit it and save it without rewriting what it did not understand.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.4 101 9/28/2026
1.1.3 109 9/28/2026

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