Popularity
2.6
Stable
Activity
0.0
Stable
88
6
23

Description

MaltReport is an OpenDocument/OfficeOpenXML powered reporting engine for .NET and Mono, it is inspired by the excellent Relatorio Project.

MaltReport DO NOT REQUIRES MS-Office or LibreOffice to generate document. On the contrary, MaltReport manipulates ODT/ODS/XLS/DOC file by itself, so it could be fast & reliable.

The template of your report is just a normal document can be created by LibreOffice or MS-Word/MS-Excel (ODT/ODS and XLS/DOC are fully supported), So you can use LibreOffice and MS-Word/Excel as a WYSIWYG report development tools.

Programming language: C#
License: GNU General Public License v3.0 or later
Latest version: v2.1.1

MaltReport alternatives and similar packages

Based on the "Template Engine" category.
Alternatively, view MaltReport alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of MaltReport or a related project?

Add another 'Template Engine' Package

README

MaltReport

NuGet Stats Build status Build Status

MaltReport is an OpenDocument/OfficeOpenXML powered reporting engine for .NET and Mono, it is inspired by the excellent Relatorio Project.

There is a briefly introduction in Chinese: MaltReport2 中文使用简介

MaltReport DO NOT REQUIRES MS-Office or LibreOffice to generate document. Instead MaltReport manipulates ODT/ODS/XLS/DOC file by itself, so it could be fast & reliable.

Documents

Getting Started

Prerequisites

  • Visual Studio 2017: This project is written in C# 7.0 using Microsoft Visual Studio 2017 Community Edition.

Supported Platform

  • .NET Framework 4.6.1
  • .NET Standard 1.6+

Installation

MaltReport can be installed from NuGet.

Demo & Usage:

Step 1: Organize your data into Context

var employees = new Employee[]
{
    new Employee{ Name = "Micheal Scott", JobTitle = "Branch Manager" },
    new Employee{ Name = "Pam Beesly", JobTitle = "Office Administrator" },
    new Employee{ Name = "Jim Halpert", JobTitle = "Salesman" },
    new Employee{ Name = "Dwight Schrute", JobTitle = "Salesman" },
    new Employee{ Name = "Andy Bernard", JobTitle = "Salesman" },
};

var image = new ImageBlob("jpeg", File.ReadAllBytes("Image.jpeg"));

var data = new Dictionary<string, object>()
{
    { "employees", employees },
    { "image", image },
};

var context = new TemplateContext(data);

Step 2: Prepare your template

Template

Step 3: Load & render your template


using (var stream = File.OpenRead("EmployeesTemplate.odt"))
{
    var odt = OdfDocument.LoadFrom(stream);
    var template = new OdtTemplate(odt);

    var result = template.Render(context);

    var desktopDir = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
    var outputFile = Path.Combine(desktopDir, "generated.odt");

    result.Save(outputFile);
}

Step 4: Check the generated document out:

Generated Document

License

MaltReport is licensed in the MIT license.

Author: Wei "oldrev" Li [email protected]

  • Copyright (C) 2009 Wei "oldrev" Li
  • Copyright (C) 2010-2016 Sandwych Consulting LLC.
  • Copyright (C) 2017-TODAY Binary Stars Technologies LLC. & Contributors

CREDITS


*Note that all licence references and agreements mentioned in the MaltReport README section above are relevant to that project's source code only.