Migration of Existing List & Label Projects to Cross Platform (LLCP)

Klicke hier für den deutschen Artikel.

Introduction

In this KB article, we show you how to convert a List & Label Classic project, for example .lst, .lbl, .blg, …, into the JSON format compatible with List & Label Cross Platform (LLCP): either using the included Converter tool or by performing your own conversion in code using the ProjectConverter classes.

Background

LLCP differs conceptually from List & Label Classic and is designed from the ground up as a cross-platform reporting engine, meaning not only for Windows, but also for Linux, macOS, iOS, Android, and container environments. Your Classic projects therefore need to be converted into a platform-independent format that no longer depends on Windows-specific Designer files.

Another advantage is that JSON is an open, widely used standard format that can, for example, be easily compared in version control systems such as Git or processed automatically.

Implementation

You have two options for converting your project: either use the included Converter tool from our samples or perform the conversion using the corresponding ProjectConverter classes in your own application.

Option 1: Conversion using the included Cross Platform Project Converter

This is the fastest way if you want to manually convert Classic project files into the LLCP JSON format. To do this, use the Converter tool that is included with our samples.

You can find the Project Converter in the Cross Platform samples under your List & Label installation path, for example:

"C:\Program Files (x86)\combit\LL31\Samples\Microsoft .NET\.NET 8\Cross Platform\Project Converter\ProjectConverter31.App.exe"

The operation is intentionally simple: select the Classic project file to be converted as well as the desired target path, then start the conversion. The result is a JSON project file that can be used with List & Label Cross Platform.

Option 2: Conversion using the ProjectConverter classes

If you do not want to perform the conversion manually using the tool, but instead want to automate it or integrate it directly into your own application, the ProjectConverter API is the right choice. It allows you to programmatically convert Classic projects to JSON and flexibly integrate the conversion into your existing workflows.

Required packages / references

For the conversion, you need the combit.ListLabel31.ProjectConverter NuGet package, which contains all ProjectConverter classes used to convert Classic projects, for example .lst or .lbl, into the LLCP JSON format.

You can find more information about converting your projects using the ProjectConverter classes in the LLCP documentation.

Important note when using units of measurement in formulas

Regardless of which of the two options you use to convert your projects, there is one very important point you must keep in mind: whenever coordinates, widths, heights, or distances are defined as formulas, numeric values in these formulas must always be wrapped with UnitFromSCM(...).

Why is this important?

Depending on the platform and environment, different units of measurement may be used internally. While in many projects you may think in millimeters or centimeters, other systems or platforms may use different base units, for example inches instead of centimeters. As a result, formulas that do not use UnitFromSCM(...) may be interpreted differently on different platforms.

What is SCM?

SCM is an internal unit of measurement in List & Label. 1 SCM equals exactly 1/1000 millimeter.

  • 1 mm = 1000 SCM
  • 10 mm = 10000 SCM
  • 20 mm = 20000 SCM
  • 1 cm = 10000 SCM

SCM serves as a uniform, device-independent and platform-independent basis for position and size specifications. This ensures that layouts are calculated and rendered consistently regardless of the unit system used, for example millimeters or inches.

You can find more information about the UnitFromSCM(...) function in the List & Label Designer documentation under UnitFromSCM.

Example: Fixed page margin of 2 cm

You want to reduce the table width by 2 cm from the right margin. 2 cm equals 20 mm = 20000 SCM.

Correct: TableWidth() - UnitFromSCM(20000)

Incorrect: TableWidth() - 20000

Properties that you should check in particular are all places where positions, sizes, or distances are calculated using formulas, for example:

  • Object positions, such as Left and Top
  • Object width and height, such as Width and Height
  • Spacing and indents, such as margins, padding, spacing, borders, or frames
  • Calculated widths and heights following the pattern “X minus Y” or “X plus Y”
  • Cond formulas and other expressions that contain fixed numeric values

If you notice layout differences after the conversion or see that the output does not look correct, a very good first step is to check exactly these formulas and make sure that all numeric values in the formulas are correctly wrapped with UnitFromSCM(...).