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.

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.