Text Control products can be used to create documents programmatically from scratch, pre-designed templates can be used to populate merge fields using the class and documents can be edited using true WYSIWYG rich text controls for Windows Forms, WPF and ASP.NET.
Creating Documents from Scratch
TX Text Control provides a powerful and complete API to create and manipulate documents programmatically. This API can be used in any .NET application such as Windows applications, Windows Service applications or web services.
The code inserts a paragraph, a table and exports the document as an Adobe PDF document:
Merging Templates using MailMerge
After a template has been successfully designed in one of the visual rich text controls of TX Text Control or in MS Word, the reporting engine is merging data into the template. For each data row of the master table in the data source, a document is created. Merge fields are populated with column values and repeating blocks are merged with data rows of related child tables in the data source.
A data source can be any IEnumerable object (business objects), JSON objects, DataSet and DataTable objects. Text Control Reporting follows the concept of pre-shaped data where data queries are executed before data is passed to the merge process.
The following code creates an instance of the reporting engine MailMerge to merge the template that is loaded into a ServerTextControl with an IEnumaerable object. Finally, the document is exported as a PDF document:
Editing Documents using MS Word-Compatible Editors
The class represents a ribbon tab to integrate mail merge and reporting functionality directly into your TX Text Control based application. Together with all other ribbon tabs known from typical word processors, creating MS Word compatible template designers and word processors is a very easy task.
Not being dependent on an additional third-party tool such as MS Word to create templates is a very important key aspect when implementing word processing functionality into business applications. The MS Word compatible editor has the look and feel of MS Word, but can be customized and adapted to user requirements. MS Word templates can be reused and edited in TX Text Control.
Templates can be stored in industry standard(ized) formats such as DOCX, DOC and RTF and are always compatible with other word processors such as MS Word.
The following screenshot shows the Windows Forms version of TX Text Control. The visual controls can be automated in the same way like the non-visual class ServerTextControl using the same, compatible API.
Creating Documents in the Cloud
ReportingCloud provides a RESTful Web API to manage templates and to merge templates with hierarchical data from JSON strings.
The following code uses ReportingCloud and the ReportingCloud .NET Wrapper to merge data into a template:
Text Control provides the most powerful tools and controls to integrate document creation processes into any kind of business applications.