.Net Template Engine / Report Solution

I want to add custom reports / forms to a web application. I want users to be able to download a report / template definition file and then be able to print a PDF or Word document (one or the other does not have to be both) for each of their widgets based on the template they loaded. I am unable to install anything on the server and I am looking for an open source / free solution.

Data source. The data will be in the form of data or dataset that the application receives. The report tool will not be able to connect to any database.

+2


source to share


3 answers


We are very happy with the free StringTemplate.Net library for generating HTML (or any other text format) reports. The templating language is simple enough that anyone who understands HTML should be able to adapt templates. HTML reports can be displayed directly in the application using the WebBrowser control and we use a commercial library to convert HTML to PDF if needed.

Example StringTemplate from 5 Minutes Intro :



<html>
    <head>
       <title>$title$</title>
    </head>
    <body>
       <p>Hello again, $name$ !</p>
       <p>Greetings to your friends $friends; separator=", "$</p>
   </body>
</html>

      

We also used Microsoft ReportViewer . This has the advantage that you have viewer control for both WinForms and WebForms, PDF and Excel export, search functionality, SQL Server integration, and advanced print options. But AFAIK requires Visual Studio to create / customize reports using the Report Designer; it does not support customization of reports by end users. It seems to be more geared towards a drag and drop programmer working in a Microsoft full stack environment (IIS, ASP.NET, SQL Server).

0


source


I am developing a .net library designed to do this job. It works with RTF files. You provide template and data and generate an RTF report. It includes a proprietary programming language (very small but powerful :)), including data loops (with and without conditions) and "IF ELSE ENDIF" as a clause that allows it to conditionally generate parts of a document. It is also capable of using variables provided by the programmer besides data. I am going to include many other features like formatting, collecting events, etc. It will be a commercial product (really very cheap) and even it is still under development and needs a lot more testing, I'm happy with it so far. If you are interested to know about this, keep in touch. Respectfully,



Gonzalo

0


source


Just checking my answers and found this. It's a bit late maybe, but I wouldn't miss the chance to tell you that I finally uploaded NTemplates to codeplex.

Check out ntemplates.codeplex.com.

Respectfully,

Gonzalo

0


source







All Articles