Callback
  • From a market stall to a store

  • -

  • From a store to a retail chain

  • -

  • From retail to manufacturing

"Undefined identifier" when printing: why it occurs and how to fix it yourself

Volodymyr Vytyshchenko
Volodymyr Vytyshchenko

Trade automation expert at Torgsoft

Resolving the «Undefined Identifier» Message During Printing: Causes and Step-by-Step Guide

In the daily operation of a retail business, printing documents (fiscal and non-fiscal receipts, delivery notes, certificates of completed work, payroll calculation sheets) is a continuous process required for customer service and internal accounting. When working with this mode, entrepreneurs most often ask technical support specialists the following questions: why an undefined identifier message appears when trying to print a report, how to replace parameters in a document independently after switching to the Ukrainian interface language, and which characters must not be used in product names to ensure correct receipt printing.

Basic Concepts and the Essence of the Issue

To understand the situation in depth, it is necessary to define the key terms used in the accounting system:

  • Print template — a visual document form configured by the user or used by default to output information to a printer.

  • FastReport — a report generator and editor built into the software and used to configure the appearance of templates.

  • Variable (or Expression) — a special parameter in the system (for example, amount, customer name, date) that automatically retrieves current data from the database when a printed document is generated.

A message with the text «Undefined Identifier» (or «Identifier expected», «Неопределенный идентификатор») indicates that, when generating the document, the report editor cannot recognize or find in the database the variable specified in the print template.

Cause-and-Effect Relationships Behind the Issue

There are three main reasons why the software cannot identify a specified parameter during printing:

1. Changing the Software Interface Language to Ukrainian

Undefined identifier questions most often arise after entrepreneurs switch the software from Russian localization to Ukrainian. If the print template was created earlier, it may contain variables in Russian (for example, «счет», «Период», «Начислено»). Since the interface and database begin working with Ukrainian equivalents, Russian variables are no longer recognized by the system, which causes printing to stop and the corresponding message to appear.

2. Renaming Variables in New Versions of the Software

To describe variable functions more accurately in the system, developers may rename them. For example, the variable «счет» was renamed to «Тип счета» (or the corresponding Ukrainian equivalent), because it specifically defines the type of settlement account. Using the old variable format in a custom template causes the recognition process to stop.

3. Using Square Brackets in Product Names

When printing a fiscal receipt using a software ECR (pECR), the system may report an expression error and an undefined identifier if the name of the sold product contains square brackets. In the FastReport editor, square brackets are system characters that indicate the boundaries of a variable. Therefore, the software attempts to interpret part of the product name as system code, cannot find it, and stops printing.

Step-by-Step Guide to Fixing the Issue Yourself

If an undefined identifier message appears during printing, you can correct the template settings yourself by following these steps:

  1. Identify the problematic field. The message text always specifies the exact element (for example, Memo51, Memo3, Memo19) in which the software found an unrecognized variable.

  2. Open the template settings. Go to the software’s main menu and select Settings — Print Template Settings.

  3. Select the required document. In the left part of the window, find the template that causes the issue during printing (for example, «Delivery Note», «Certificate of Completed Work», «Payroll Calculation Sheet») and click Settings to open the FastReport editor.

  4. Find and delete the old variable. Find the object (text field) in the template form that causes printing to stop, open it by double-clicking with the mouse, and delete the text of the unrecognized variable together with the square brackets.

  5. Insert the correct variable. In the text editor window, click Insert Expression, go to the Variables tab, and double-click the correct Ukrainian-language variable in the data tree. It will automatically appear in the expression field.

  6. Save the changes. Click OK, then save the template by selecting File — Save (or clicking the save icon) in the FastReport editor.

For pECR receipt printing issues, it is enough to open the product card for editing and remove square brackets from its name.

Guide to Fixing the Issue Yourself

Answers to Frequently Asked Questions from Entrepreneurs About Printing

 Which specific parameters most often need to be changed when switching to Ukrainian in certificates of completed work?

Entrepreneurs often ask about configuring certificates of completed work after changing the language. In these documents, the unrecognized Russian variable «счет» (which the software reports as an expression error) must be replaced with its Ukrainian version. After removing the Russian field and inserting the Ukrainian variable, the certificate of completed work will print correctly.

 Why does the system report an identifier error for «Начислено» or «Период» when printing a payroll sheet (payroll calculation sheet)?

This occurs when the standard payroll calculation sheet template is used while the software interface is operating in Ukrainian. The variables «Начислено» and «Период» are Russian-language variables and cannot be processed by the Ukrainian-language database. To fix this, open the payroll calculation sheet template and replace these parameters with their Ukrainian equivalents using the variable insertion tool.

 What should I do if, after creating a custom template, some variables are displayed in English or are not recognized?

This may happen if, when saving a document in a localization other than Russian, the variable insertion algorithm in FastReport saved them in system form without translating the categories. In this case, check the data tree in the template editor and make sure you add the variable specifically from the translated data group of the current document.

Dear entrepreneurs. The architecture of Torgsoft and the foundation of its databases have been developed for more than 15 years, which created a certain technical legacy by the time of our large-scale transition to Ukrainian localization. Despite the systematic adaptation of the product, it is technically impossible to completely eliminate elements of the original language environment from the interface for two objective reasons.

First, a huge volume of system variables and previously created custom print templates has already been stored in databases in its original form. Their forced automatic replacement carries direct risks of compromising the integrity of your current accounting data and duplicating data categories.

Second, a significant part of text notifications is generated not by Torgsoft itself, but returned by the Windows operating system, SQL Server reports, or external services (for example, postal service APIs) without translation. These system responses depend solely on the regional settings of your equipment and third-party servers. The company continuously improves localization; however, the presence of residual system artifacts in advanced settings or logs remains a technical reality that must be taken into account when working with the software.


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



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