LINQ Reporting Engine

Build data-driven Wordize documents from templates using expressions, loops, conditions, and structured data sources.
What is this page about?

This section explains how to design Wordize templates and populate them with application data by using the LINQ Reporting Engine.

It covers the full reporting workflow, from the first template and data source to nested regions, formatting choices, diagnostics, and safe deployment practices.

The LINQ Reporting Engine evaluates expressions embedded in a template document and replaces them with values, repeated blocks, or conditionally selected content. You can bind plain .NET objects directly or load structured data from JSON, XML, and CSV.

Think of a report as three layers working together:

  1. A template that defines the document structure
  2. A data model that exposes values and collections
  3. A build step that combines both into the final output

Representative Example

Using the following:

  • template:

    Booking: <<[booking.Reference]>>
    Traveler count: <<[booking.Travelers.Count()]>>
  • data:

    Use the shared sample model and sample data setup from Shared Sample Model and Data

  • use case:

    Booking booking = new Booking() { Reference = "BK-48291" };
    booking.Travelers.Add(new Traveler() { FullName = "James Bond" });
    booking.Travelers.Add(new Traveler() { FullName = "Money Penny" });
    
    Wordize.Reporting.ReportBuilder.BuildReport("in.docx", "out.docx", booking, "booking");

You will get the expected output:

Booking: BK-48291
Traveler count: 2

Documentation Map

Use these pages in order if you are new to reporting, or jump directly to the topic you need:

Page You will learn how to
Quick Start Build a complete report from a template and a C# object model
Shared Sample Model and Data Reuse one canonical Booking/Traveler/FlightSegment model and sample object setup across pages
Template Syntax Basics Understand tags, expressions, loops, conditions, variables, and output rules
Using Contextual Object Member Access Resolve members from the current scope without repeating object names
Dynamic Insertion Tags Insert documents, HTML, images, hyperlinks, and bookmarks with explicit syntax
Advanced Tags Reference Use content-control, color, table-merge, and list-numbering tags
Working With Data Sources Bind custom objects, JSON, XML, CSV, collections, and dictionaries
Queries and Control Flow Filter, sort, group, project, and shape repeated content
Document Layout Patterns Apply reporting tags inside paragraphs, lists, and tables
Working with Tables Build row and column data bands and cross (pivot) table layouts
Working with Charts Shape and bind chart-ready category/value data for reporting templates
Troubleshooting and Best Practices Diagnose template issues, tune behavior, and reduce risk in production
FAQ Review concise answers to common implementation questions

What the Engine Is Good At

  • Repeating rows, paragraphs, and sections from collections
  • Switching between alternate layouts depending on data
  • Formatting text, dates, and numbers close to where they are displayed
  • Combining multiple named data sources in a single template
  • Producing reports from file-based or in-memory data
Important to note:
Use LINQ Reporting when the shape of the output depends on collections, conditions, or calculated expressions. For simple field replacement scenarios, Mail Merge can be a better fit.