The object rendering border for the Clip property

2017-08-12

In this article I would like to draw your attention to an interesting property of the of the object Text. Clip property determines whether to display the text, if it goes beyond the boundaries of the object. If this feature is enabled, the text will be cut according to the boundaries of the object. If disabled - will be displayed in full, as if the object was stretched.

Let's look at an example. Create a simple report. For example, I bring a list of product categories with pictures:

Please note that the selected text object with the name of the category has a small size. I specifically disabled text wrapping (WordWrap property) for clarity.

Preview the report:

 

As you can see, the names of the categories cut because of the small size of the text object. Now, set the Clip property to false (default true) for the same object.

 

Let's see how the report will look is now:

 Names are displayed in full, despite the size of the text object.

Now do export to PDF format: 

The document corresponds to the report, everything is correct.

I went ahead and decided to display the text vertically. To do this, change the angle of the text of the object in the Angle property, for example - 270. Now the object of the text is as follows:

 Run the report:

 At this time, the property did not work. But it is not all that bad. Let us export the report in PDF:

And here, the Clip property really disabled and the text is displayed correctly, despite the size of the text object.

Make text slope of 45 degrees and repeat the experiment. 

The report is still not fully displayed text. And now export to PDF:

 

And this time, export to PDF did not disappoint. Everything looks correct.

Summarize. The property Clip of the text object truncates text that does not fit within the boundaries of the object. If you use the autogrow feature object may occur displacement of neighboring objects or objects overlap that for some exports will lead to an incorrect display of the report. In such cases it is convenient to disable Clip property.

From considered above, it is clear that now this "feature" works only with horizontal withdrawal of the text in the reports. However, when exporting to PDF, the rotation angle of the text does not matter. The text is always displayed in its entirety.

November 26, 2024

Installing FastReport on .NET 8.0 and Creating a Simple Report

The purpose of this article is to explain step by step how to install FastReport on .NET 8.0 and how to create a simple report. Taking the reporting process from the beginning, it will show how to connect, design and view reports.
November 20, 2024

Localization and Language Switching in FastReport VCL

FastReport VCL supports 40 languages for interface localization and allows you to change the language on the fly through menus or code, without recompilation.
November 01, 2024

New Features of the FastReport VCL Editor

We are considering new features of the report editor: extension lines, highlighting of intersecting objects, updated report and data trees.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2024 Fast Reports Inc.