+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

TX Text Control: Alternative Rendering of RTF Content in List & Label

net
(combit Team) #1
Valid from List & Label 21
List & Label uses the installed RTF control from Microsoft on their Windows operating systems. This control is also used in WordPad. There may be several different versions of the control installed on the system.
 
With the option LL_OPTION_MAXRTFVERSION (or property .MaxRTFVersion of the component) you can decide which version of the RTF control should be used/loaded. Certainly the different RTF versions behave differently which could have also have an impact on List & Label reports. Furthermore the features of that control are limited - especially when rendering tables.
 
Alternatively you can use the RTF control TX Text Control .NET for Windows Forms from Text Control GmbH in List & Label as independent Designer object, if you have a valid license of the control. So it is possible to use RTF content in your List & Label reports which is rendered with TX Text Control in your .NET application. This method is shown in detail in the enclosed programming sample (see also class 'TXDesignerControl').
 
Requirements and Use
  • The enclosed programming sample uses C# with Visual Studio 2015
  • Installed TX Text Control .NET for Windows Forms - at least version 22.0 Professional/Enterprise
  • Installed List & Label - at least version 21 with Service Pack 21.002
  • Please unzip the enclosed ZIP file into your List & Label installation folder under "\Programming Samples and Declarations\Microsoft .NET\". You might need to update the references in the solution.
General Information
  • The List & Label Designer object 'TXDesignerControl' can only be used in .NET - but not in unmanaged environments like C++. Background is, the TX Text Control itself is only available as a .NET component.
  • Any header and/or footer in RTF content of TX Text Control is ignored.
  • Per default tables in RTF content try to represent the layout 1:1. But if the object is smaller than the original table respectively the RTF document, clipping effects may occur. Therefore the property 'RecalcTableLayout' of the Designer object exists to force compensating the table to the smaller space. If this option is active it could have an impact on the performance because of the recalculation of the layout is computationally intensive and can modify the resulting table layout.
  • In the supplied sample document 'Great-Team.rtf' List & Label formulas and fields are used. While printing they are evaluated which could have an small impact on the performance. The sample document 'debwin.rtf' does not use List & Label formulas and fields.
The code is made available on an 'as is' basis and can be adapted at any time to your own needs. If you have any improvements, suggestions or even errors you can send them to us via our Support Center.

Links:

https://www.combit.net/de/support/files/cmbtkb/CSharpTXTextDesignerObject.zip
https://www.combit.net/en/blog/development/08-2017/using-your-own-net-designer-objects-in-unmanaged/
IDKBAE001309 KBAE001309