How to make label type report in FastReport VCL

2018-03-06

Printing labels is one sphere of application of report generators. In this article, we will look at some aspects of creating a report with labels.

In label reports, data headers are usually placed in a column, rather than in a row, as usual. What does it mean? I will show you by an example.

Here is an ordinary list of data output row by row:

And here is the columned placement of data:

As you can see, the main point of the report with the labels is to form a label of the right size and content. To do this, you must specify the size of the report page according to the size of the label. Let's look at the example.

Create an empty report with one MasterData band. Our goal is to make business cards. Since the report consists of one band, the size of the business card will be equal to the size of this band. Let's set the height of the MasterData band in the Property inspector. Set the value to 4.5 cm. To specify the width of the band, we need to use a division into columns.

To split a page into columns, open the File -> Page Properties menu. On the Other options tab, set the number of columns to 2. You can also change the width of the columns. For example, we set 8.84 cm. At the same time, the band became already more than the half page of the report. You can adjust the position of the band in the Positions property.

 

And now we will create not a complicated business card template:

Since we do not use the database in the MasterData band, we need to manually set the number of records in the properties of the band. In our case - RowCount = 12. Let's look at the report in the preview mode:

As you can see, all 12 labels fit one report page, which (in our case) is printed in A4 format.

If you use data from the database, you should leave the RowCount property for the MasterData band to 0.

VCL Lazarus FastReport Report Delphi VCL Lazarus FastReport Report Delphi
April 22, 2025

Working with the TfrShellTreeView Component in FastReport VCL

In this article, we will look at the TfrShellTreeView component. It is designed to display file system elements and is partially analogous to the TDirectoryListBox, TDirectoryOutline, and TShellTreeView components.
April 22, 2025

Working with XML and JSON Formats in FastScript

In this article, we will take a closer look at how to work with JSON and XML in FastReport, see what properties and methods they have, and build reports from code with scripts.
April 21, 2025

How RFID Tags Work in FastReport VCL

In this article, we'll check out how RFID tags work with the new TfrxDeviceCommand object in FastReport VCL with release 2025.2.
Fast Reports
  • 800-985-8986 (English, US)
  • +31 97 01025-8466 (English, EU)
  • +49 30 56837-3928 (German, DE)
  • +55 19 98147-8148 (Portuguese, BR)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2025 Fast Reports Inc.