Callback
  • From a market stall to a store

  • -

  • From a store to a retail chain

  • -

  • From retail to manufacturing

Price is printed only on the first label: Fix overlay errors in FastReport

Volodymyr Vytyshchenko
Volodymyr Vytyshchenko

Trade automation expert at Torgsoft

Printing the price and product name only on the first label: causes of the issue and step-by-step template setup in FastReport

When receiving new goods, packaging products, or performing repricing, business owners regularly use bulk label printing to mark display items or stock. This mode is needed to quickly create price labels for an entire batch of goods at once. When working with templates, business owners often ask Torgsoft technical support specialists the following questions: «Why is the price displayed only on the first price label in the printed batch?», «Why are the product name and store name present on the first label but missing on the second and all subsequent labels?», «How should the template be configured so that all information is printed correctly on every copy?».

Basic concepts and the current state of the issue

Torgsoft uses the integrated FastReport editor to create and print labels, price tags, and receipts. Work in this editor is based on special templates and system fields (bands).

  • Label template — a file that contains information about where and how product data (barcode, name, price, SKU) should be positioned on the printed label.

  • Text Object (Text Object) — a template element that contains database variables, for example, [Label."Price"] or [Label."Product name"].

  • MasterData (Level 1 Data) — the key system element (band) in FastReport responsible for repeated data output. In the editor, it is usually highlighted in yellow. All information related to a specific product unit must be located strictly within this band.

Main point: cause-and-effect relationship

The situation where information (price, product name, store name) is printed only on the first label, while all subsequent labels in the batch are printed partially empty, has a clear technical explanation.

The reason is that text objects physically extend beyond the boundaries of the MasterData system field in the FastReport editor.

Cause-and-effect relationship

If, while editing the template manually, the user increases the font size or stretches the text field containing the price or product name so that its boundaries cross the lower or upper edge of the yellow MasterData area, the FastReport report generator processes it in a specific way.

 Result: when generating the first label, the program reads all objects that at least partially touch the initial cycle. However, when generating the second, third, and subsequent labels (the next cycles of the MasterData band), an object that has extended beyond its block is ignored by the system because its coordinates no longer correspond to the active data generation cycle.

Practical example. A business owner decides to make the price on the price label larger and stretches the [Label."Price"] text rectangle downward. The lower edge of the rectangle extends beyond the yellow MasterData area. When 10 price labels are sent to print, the first one is printed correctly, while the next nine contain the barcode but no price.

Step-by-step guide to configuring the template

To ensure that information is printed on every label in the batch, the template must be adjusted according to the rules of the FastReport editor.

  1. Open the template for editing. Go to Settings -> Label Printing Settings (or Print Template Settings). Select the required template and click Edit.

  2. Launch FastReport. In the opened window, click Settings, after which the FastReport report generator window will open with a visual representation of your label.

  3. Identify the MasterData field. Find the horizontal bar (band) labeled MasterData. The space below this bar (usually yellow) is the working area of your label.

  4. Check object boundaries. Carefully inspect all text objects (price, name, barcode). Find those whose borders extend beyond the lower edge of the yellow MasterData area or overlap other bands.

  5. Adjust the objects. Select the problematic object with the mouse. Using the handles around the object, reduce its height or width so that it fits completely inside the yellow MasterData area without touching its edges.

  6. Save the result. Click the save button (floppy disk icon) in the upper-left corner of FastReport and close the editor. Perform a test bulk print.

Answers to frequently asked questions from business owners

? Torgsoft prints the product name on the first label, but not on the following ones. Is this related to a malfunction in the program itself or the database?

There is no problem with the Torgsoft program itself or the database in this case. This is solely an issue with the formatting of the visual template. The database correctly transfers information to FastReport, but because the product name field extends beyond the boundaries of the MasterData system field, the report generator stops displaying this variable starting from the second label.

? The first price label displays the price and store name, while the following ones do not. Why does this information disappear while the barcode remains?

The barcode remains because its graphical boundaries are correctly positioned inside the yellow band. The store name and price disappear only because, during previous editing, these specific fields were stretched or moved so that they crossed the boundaries of MasterData. The solution is to return the boundaries of these fields to the permitted area.

? What should I do if a long product name does not physically fit within the allocated rectangle and I have to stretch it beyond the boundaries of MasterData?

The field must not be stretched beyond the band boundaries. To ensure that long text is displayed correctly and does not disappear on subsequent labels, select the text object in FastReport and configure its properties. Reduce the font size, or in the object inspector configure the StretchMode property (Stretch Mode) for this field by selecting smActualHeight (Actual Height) or smMaxHeight (Maximum Height). Also make sure that the WordWrap property (Word Wrap) is enabled so that the text automatically wraps to a new line within the existing field.


Програма обліку товару | Торгсофт



Facebook Instagram YouTube Twitter Google News Apple Podcast SounCloud

Add comment

Add comment
Thank you for your feedback! It will be published after being reviewed by a moderator.

Related articles