Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Words provides two solutions for automatic filling template documents with data: Mail Merge and LINQ Reporting Engine. But what is the difference between the two and which solution is better to choose? Let us make a closer look at each.
As well as the most of Aspose.Words features, Mail Merge mimics the Microsoft Word feature with the same name. Therefore, a typical Mail Merge template consists of common document content, merge fields to be replaced with data, and fields of other types supported by Microsoft Word defining additional logic for building a result document. For example, a Mail Merge template for an order could look as follows.
Key features provided by Mail Merge are as follows:
ADO.NET
objects as data sources (any custom data source can be supported by implementing the IMailMergeDataSource interface)Overall, Mail Merge is a good way to go if you are never going to use features beyond the scope of Mail Merge, or you have to deal with Microsoft Word Mail Merge templates. However, being tied with and limited by Microsoft Word behavior, Mail Merge cannot be easily extended to cover every specific scenario, and this is where LINQ Reporting Engine stands out.
In contrast to Mail Merge, the concept of LINQ Reporting Engine was born within Aspose.Words and is not tied with any Microsoft Word legacy. The engine uses its own template syntax based on plain-text tags, which can be one of the reasons to switch to its usage if working with Microsoft Word fields is too complex for you or your users creating templates. For example, an alternative LINQ Reporting Engine template for an order looks as follows.
However, the major advantage of the engine is its out-of-the-box support of many features missing in Mail Merge. The following are the key ones:
ADO.NET
objects, JSON, XML, CSVADO.NET
and other data sources) directly in templatesThe good news is that LINQ Reporting Engine can be further extended to fulfill almost any specific need. So if you face any issue while implementing your specific requirement using the engine, please feel free to contact us at our Free Support forum, and we will gladly provide you a solution based on existing features of the engine or introduce a new feature to address your need.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.