DoddleReport generates tabular reports from any IEnumerable datasource.

Out of the box it can render reports to Excel, PDF, HTML, and CSV – fully pluggable of course. I designed the project to provide reporting output over the LINQ queries we had already written for the application, but maybe you can find other uses for it.

Blog Updates

For updates and other topics please visit my blog at or follow @matthidinger

New to DoddleReport?

Get it!

NuGet Packages

DoddleReport has been split into multiple packages to support more users’ needs. See their Descriptions within NuGet for more on the differences

  • Install-Package DoddleReport
  • Install-Package DoddleReport.Web
  • Install-Package DoddleReport.iTextSharp
  • Install-Package DoddleReport.AbcPdf
  • Install-Package DoddleReport.OpenXml


New in v1.2

  • NEW WRITER: A new OpenXML ExcelReportWriter found in the DoddleReport.OpenXml package, courtesy of Louis-Philippe Perras
  • NEW WRITER: A new iTextSharp PDF writer can be found in the DoddleReport.iTextSharp package, courtesy of Louis-Philippe Perras (thanks again!)
  • Breaking change: The root namespace changed from Doddle.Reporting to just DoddleReport
  • Breaking change: The Default Orientation for reports is now Portrait
  • All Web references moved to separate project to allow for .NET Client Profile support for WinForms/WPF
  • Added “myReport.RenderHints.BooleansAsYesNo = true” to write Yes/No on the reports for boolean fields
  • Added custom FileName support for web reporting as requested in Discussions
  • Added MVC Areas support by calling areaRegistrationContext.MapReportingRoute();
  • Various Bug fixes and enhancements as reported in the Discussion forum and Issue Tracker

So what does it generate?

The following samples are generated live in real-time (notice the data will change every time you open the report)

Excel Report (OpenXML)


This report doesn't render correctly when served from Azure Web Sites. I'm not sure why yet. If you deploy DoddleReport to a local IIS server it will work perfectly - but the See It Live link below is currently broken because I'm hosting in Azure.

  • Creates a native Excel file using OpenXML
  • Requires the DoddleReport.OpenXml package
  • See it live!

Excel Report (HTML)

  • Creates an Excel file using HTML (downside being an Excel security prompt when opening the report)
  • Automatic Sticky/Frozen Headers stay at the top when scrolling through the data
  • See it live!



PDF Report (iTextSharp)

  • Automatically repeats title and column headers numbers on every page
  • Requires the DoddleReport.iTextSharp package
  • See it live!

PDF Report (ABCpdf)

  • Automatically repeats title, column headers, and page numbers on every page
  • Requires the DoddleReport.AbcPdf package
  • Requires an ABCpdf license
  • See it live!




HTML Report



Basic Usage

// Get the data for the report (any IEnumerable will work)
var query = ProductRepository.GetAll();
var totalProducts = query.Count;
var totalOrders = query.Sum(p => p.OrderCount);

// Create the report and turn our query into a ReportSource
var report = new Report(query.ToReportSource());

// Customize the Text Fields
report.TextFields.Title = "Products Report";
report.TextFields.SubTitle = "This is a sample report showing how Doddle Report works";
report.TextFields.Footer = "Copyright 2011 © The Doddle Project";
report.TextFields.Header = string.Format(@"
    Report Generated: {0}
    Total Products: {1}
    Total Orders: {2}
    Total Sales: {3:c}", DateTime.Now, totalProducts, totalOrders, totalProducts * totalOrders);

// Render hints allow you to pass additional hints to the reports as they are being rendered
report.RenderHints.BooleanCheckboxes = true;

// Customize the data fields
report.DataFields["Id"].Hidden = true;
report.DataFields["Price"].DataFormatString = "{0:c}";
report.DataFields["LastPurchase"].DataFormatString = "{0:d}";

Last edited Aug 13, 2013 at 5:55 PM by mhidinger, version 41