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.

September 19, 2024

How to troubleshoot the most common issues when installing FastReport VCL

We have compiled a list of the most popular problems when installing FastReport VCL and have prepared detailed instructions on how to fix the problems that have arisen.
August 12, 2024

How to build and install the Postgres plugin in FastReport .NET

This article describes how to connect to the database using the FastReport .NET plugin for the report designer from Visual Studio via the NuGet server.
August 08, 2024

How to install FastReport .NET and its components on Windows

Step-by-step instructions for online and manual installation via the FastReport registration code.NET and its components in Windows.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314

© 1998-2024 Fast Reports Inc.