I’m looking for a free templating engine to generate simple reports. I want some basic features such as :
- Ability to Write Loops (with any IEnumerable)
- Passing Variables
- Passing Templates Files (main template, footer, header)
I’ll use this to generate reports in HTML and XML. I’m not looking for a ASP.NET Template Engine.
This is for a WinForms applications.
I’ve seen this question Can you recommend a .net template engine?, however all of those template engines are total overkill for me and focused for ASP.NET.
Please only recommend free libraries.
// I’m still looking an NVelocity but it doesn’t look any promising for .NET, overly complicated, when you download it’s bunch of files not clear what to do, no tutorial, startup document etc.
I second not recommending nVelocity. It is a horrible port.
.NET actually has built in templating abilities by using CodeDOM.
Here is a pretty good walkthrough of how to do it:
http://www.codeproject.com/KB/cs/smarttemplateengine.aspx
With some minor coding, you’ll be able to create templates that have inline C#: