.Net Template Engine/Report Solution [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionI am looking to add custom reports/forms to a web application. I want users to be able to upload a report definition/template file and then be able to print out a PDF or word document (one or the other it doesn't need to be both) for each of their widgets based off of the template they uploaded. I can't install anything on the server and am looking for an open source/free solution.
Data Source- The data will be in the form of a datatable or dataset that the application fetches itself. The report tool does will not be able to connect to any database.
We're pretty happy with the free StringTemplate.Net library for generating HTML reports (or any other text-based format). The templating language is simple enough that anyone who understands HTML should be able to adapt the templates. The HTML reports can be shown directly in the application with the WebBrowser control, and we use a commercial library to convert the HTML to PDF if desired.
A StringTemplate example from the 5 minute introduction:
<html>
<head>
<title>$title$</title>
</head>
<body>
<p>Hello again, $name$ !</p>
<p>Greetings to your friends $friends; separator=", "$</p>
</body>
</html>
We have also used Microsoft ReportViewer before. This does have the advantage of coming with a viewer control for both WinForms and WebForms, export to pdf and excel, a search feature, SQL Server integration and advanced printing options. But AFAIK it requires Visual Studio to create/customize reports with the Report Designer; it does not really support report customization by end users. It seems to be more oriented towards the drag-and-drop programmer working in an environment with a full microsoft stack (IIS, ASP.NET, SQL Server).
I'm developing a .net library intended to do this job. It works with RTF files. You provide the template and the data and it generates the RTF report. It includes a propietary programming language (a very little but powerful one :) ) including Loops for datatables (with and without conditions) and an "IF ELSE ENDIF" like sentence whichs allows it to conditionally generate parts of a document. It's also capable of using variables provided by the programmer, besides the datatables. I'm panning to include many other features such as formatting functions, raising events, etc. It will be a commercial product (a really very cheap one), and even it's still under development and needs much more testing, I'm pretty happy with it so far. If you are interested in hearing about it, keep in touch. Regards,
Gonzalo
Just was checking my answers and found this one. It's a bit late perhaps but I wouldn't miss the chance to tell you I finally uploaded NTemplates to codeplex.
Check ntemplates.codeplex.com.
Best regards,
Gonzalo
精彩评论