ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / RTF control
  • Overview of the RTF control
  • The RTF control can only be used in a report
  • How to modify the text of an RTF control in a report?
  • Remarks
  • Limitations
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview of the RTF control

The RTF control can only be used in a report

The "RTF" (Rich Text Format) control is used to display a formatted character string in your report. This character string is in RTF, which means that specific tags are used to define the formatting of each character or character string. These tags are not displayed in the control.
For example, an "RTF" control is used to display the following text:
To create an "RTF" control:
  1. On the "Creation" tab, in the "Text" group, click "RTF".
  2. Click at the desired location to create the control in the report.
Remarks:
  • From version 22, the RTF control in a report corresponds to an RTF Static control.
  • In a window, you have the ability to use an RTF edit control or an RTF static control. For more details, see Edit control or Static control.
How to modify the text of an RTF control in a report?
The text of an "RTF" control can be modified:
  • through programming (with the Caption property).
    WINDEV Remark: You can also use RTFLoad to assign a value to the RTF control.
  • in the report editor.
To modify the text of the RTF control in the report editor:
  1. Select the control. The selection handles appear around the control.
  2. Click the control again. The mouse cursor turns into an input cursor.
  3. Enter the new text of the control.
  4. The layout toolbar allows you to modify (if necessary) the formatting of the text.
  5. As soon as you click outside the control, it switches back to read-only.

Remarks

  • The text displayed in the RTF control can contain the value of an item printed in the report.
    To insert the value of an item or a control of the report into the text of the Static control, enter the name of the item or control between [% and %].
    For example, the control text can correspond to: The [%SupplierName%] supplier sells the [%ProductName%] product at [%PriceIOT%]. SupplierName, ProductName and PriceIOT will be replaced with their value when the report is executed.
  • The text displayed in the RTF control can come from a text item found in the data source of report.
    If the control is linked to an item, the name of the associated item is displayed in the "Linked item" combo box of the "General" tab of control description.

Limitations

By default:
  • The format of the RTF files supported by the WINDEV and WEBDEV prints is the same as the RTF format supported by "Wordpad" (up to Windows XP). Some additional limits must be noticed when exporting a report to an RTF document (the tables and the text areas are not supported for example).
  • To print an RTF control, the "RICHED20.DLL" file must be found on the current computer. In most cases, the "RICHED20.DLL" file is in the Windows system directory.
  • If the RTF file is generated by another program (Microsoft Word, etc.), it is recommended to open the file in Wordpad to check the RTF compatibility. Wordpad will provide a more realistic print preview.
  • In all cases, we recommend that you re-save the file in Wordpad to force the RTF format.
  • The options for zooming the RTF control are not compatible with the display of links in the text. If links are added by AddLink, the zoom will be automatically forced to 100%.
  • The tables and the images found in an RTF document cannot be retrieved in an RTF control.
    To retrieve the tables and images of an RTF document in an RTF control, check "RTF with images and tables" ("General" tab in the description window of control). In this case, the compatibility with Wordpad and the presence of RICHED20.DLL are not required anymore.
If you are using iParameter with the "RTFWINDOWS=NO" parameter or with the iRTFWithImagesAndTables constant, you will have the ability to print tables and images in the RTF controls. The compatibility with Wordpad and the presence of RICHED20.DLL are not required anymore.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help