What are the Limitations of TFORMer in Regards to CSV Files?

  • There is a limit of maximum 64 000 characters per line (including separator characters). Once you exceed this limit, line breaks which are inserted automatically can cause import errors.
  • The number of data columns is not limited, but up to 20 000 columns are possible. Expect a slower report if you insert a huge number of data columns.
  • The number of lines or data records is only limited by the available system memory.

If you can't deal with these limitations, we suggest you to use XML as data import format.

How to Create a Hyperlink Using the Expression Editor?

Follow the instructions below to create a hyperlink for HTML or PDF output using variable data (data fields):

  • Add a text field and choose the option Expression.
  • Switch to the HTM view (small icon above the input field) and insert the following expression:

    "<a href='" + LinkHref + "'>" + LinkDisplayName + "</a>"
    

    In this example the data field LinkHref contains the URL and the data field LinkDisplayName includes the hyperlink text.

Can't Format a Date Properly

In order to format a date-value properly, TFORMer requires a value of type "Date" (and not of type string).

Solution: Convert your String data field to the type Date with this function: CDate(DateExpiration)

Format (CDate(DateExpiration), "dd-MM-yy")

CDate(..) parses the string and extracts the date from it. If this is not possible, it returns the actual date (Now()). The date string must contain the date in the format of the actual system locale (e.g. English: "mm/dd/yyyy" or "yyyy-mm-dd").

How can I Calculate the Check Digit EAN/Mod-10

TFORMer V6.0.1 and before

The NVE / SSCC check digit is calculated the same way as UPC/EAN number. Here are the steps:

  • From the right to left, start with odd position, assign the odd/even position to each digit.
  • Sum all digits in odd position and multiply the result by 3.
  • Sum all digits in even position.
  • Sum the results of step 3 and step 4.
  • divide the result of step 4 by 10. The check digit is the number which adds the remainder to 10.

You have to reconstruct the barcode (EAN and Mod-10) check digit function with the customary functions of TFORMer.

a) Create new data fields: NVE_17 (string) and NVE_Checkdigit (long).
b) As Pre-Evaluation in the detail area, the following check digit extension is the result of:

// first add odd positions from right to left 
(index is zero based)        
NVE_Checkdigit = CLng (Mid (NVE_17, 16, 1)) 
               + CLng (Mid (NVE_17, 14, 1)) 
               + CLng (Mid (NVE_17, 12, 1))
               + CLng (Mid (NVE_17, 10, 1)) 
               + CLng (Mid (NVE_17,  8, 1)) 
               + CLng (Mid (NVE_17,  6, 1)) 
               + CLng (Mid (NVE_17,  4, 1)) 
               + CLng (Mid (NVE_17,  2, 1)) 
               + CLng (Mid (NVE_17,  0, 1))
 
// multiply with 3
NVE_Checkdigit =  NVE_Checkdigit * 3
 
// sum of digits in even position
NVE_Checkdigit = NVE_Checkdigit 
               + CLng (Mid (NVE_17, 15, 1)) 
               + CLng (Mid (NVE_17, 13, 1))
               + CLng (Mid (NVE_17, 11, 1)) 
               + CLng (Mid (NVE_17,  9, 1)) 
               + CLng (Mid (NVE_17,  7, 1)) 
               + CLng (Mid (NVE_17,  5, 1)) 
               + CLng (Mid (NVE_17,  3, 1)) 
               + CLng (Mid (NVE_17,  1, 1))
 
// at last perform mod 10 with remainder calculation
NVE_Checkdigit = (10 - (NVE_Checkdigit % 10)) % 10

After that, check the NVE-Check digit if the same check digit is in the barcode.

TFORMer V6.0.2 and later

Use the CheckDigits function:

CheckDigits (2, NVE_17)

Code Snippet: Convert German Date Format to US Format

The following TFORMer expression converts the German date format 24.12.2009 (contained in data field ProdDate) to US date format 12/24/2009.

Format (CDate(ProdDate), "MM/dd/yyyy")

Without using CDate:

Mid ( ProdDate, 
        Find(ProdDate, ".", 0) + 1, 
        FindReverse(ProdDate, ".", 0) - Find(ProdDate, ".", 0) - 1 ) + "/"
+ Mid(ProdDate, 0, Find(ProdDate, ".", 0)) + "/"
+ Mid(ProdDate, FindReverse(ProdDate, ".", 0)+1, 4)

Code Snippet: Convert E-Notation to a TFORMer Floating Point Data Field

The following TFORMer expression converts the value in EXP1 (which is a text data field holding a value in E-Notation) to a floating point value, which can be used in a TFORMer floating point data field.

IIF (Find(EXP1, "E", 0) >= 0,
      CDbl (Left (EXP1, FindReverse(EXP1, "E", 0)) ) * Exp10(CLng (Right (EXP1, Len(EXP1) - FindReverse(EXP1, "E", 0) - 1))),
      CDbl (EXP1)
)

Enlarged Bars, Black Bar at the Top

If this occurs during printing, this effect is caused by the printer driver (especially with thermal label printers). If this occurs during bitmap generation, this effect is caused by the screen driver.

The solution is to change the drawing-mode of the barcode library. Edit the TFORMer.xml configuration file and change the following entry:

<WINGDI>
<!-- Settings for TBARCODE lib -->
<!-- drawing-mode Specifies method for drawing bars on GDI printers -->
<!-- 0 = Default -->
<!-- 1 = Compatible -->
<!-- 2 = Advanced -->
<TBARCODE drawing-mode="2" />
</WINGDI>

Then restart TFORMer (or your TFORMer SDK application).

Steps to Optimize Barcode Quality

  • Adjust the module width bar code property to the boundaries of the printer dots of your printer (given by DPI, e.g. 2 dots at 203 dpi = 0.250 mm)
  • Improve quality by enabling the OptResolution barcode property (if OptResolution is enabled, add 0.001 mm to the module width).
  • Try different settings of drawing-mode in TFORMer.xml (restart TFORMer to update the change internally).

Problem with Importing nvarchar(MAX) Data Type from SQL Server 2008

It is not possible to load variables defined as "nvarchar(MAX)" into TFORMer. Instead of the real content just empty strings are imported.

Solution:

nvarchar(MAX) fields can not be imported into TFORMer version 6.0 or below. This will be fixed in a future version.

Workaround: Choose another data type for the table column or cast the data field type to another one in the SQL-Query. Below you can find an example:

Select DATALENGTH(longText), CAST(longtext AS varchar(3)) AS 'longText' from dbo.tblTest 

How to Adjust the Paper Format Within TFORMer

For printing through Windows printer drivers, the size of the output medium is retrieved from the printer driver. For the built-in output formats like PostScript, Image, PDF and ZPLII the paper formats are retrieved from the page settings in the layout or from the default settings in the TFORMer.xml file.

Starting with TFORMer 7.5 there is the possibility to define a custom media size directly in the page settings. In earlier versions it was not possible to declare a specific paper format directly in the report. For users of the SDK, the media size can also be set dynamically via SDK Print Options.

On demand you can choose different formats through tray selection (see TFORMer Designer manual, tray selection for details).

In TFORMer Designer you have several layout options (e.g. rows=auto or fixed, columns=auto or fixed, height=auto or fixed, etc) - that means through the report properties it is possible to auto-adjust the label to the size of the output media or to use fixed values (independent of output medium).

If the Designer prints correctly but TFPrint (or TFORMer SDK) does not, there may be different (paper format) settings in the Windows printer driver for Preferences and Defaults.

Make sure that both section in the printer driver properties contain the same settings:

  • Tab General ➔ Button Printing Preferences.
  • Tab Advanced ➔ Button Printing defaults.

How to Watermark Labels?

You can use the report property Watermark to define a background image, which is always printed. To define which labels are to be printed with watermarks dynamically, please proceed as follows:

  • In the layout, add a text box or image to serve as a watermark, right-click it and for the Z-Order select Move To Bottom.
  • Create a new data field Watermark of the type Integer (or Long, depending on your TFORMer Designer version) with the default value “0”.
  • In the layout, for the watermark text field add a printing condition Watermark != 1. This way, only the watermark fields that have the value 1 will be printed.
You can also use a layer with elements grouped together as watermark. Therefor, the steps would be the same with the difference that the printing condition is on the layer and not on the single element.

How can I Repeat the Headline on the Next Page in Tables and Groups?

Currently you have to use a page header area for this tasks. For a future version of TFORMer, a special property which controls this behavior is planned (using this property you can control this behavior in the group header or group footer).

How Can I Write RFID Tags with My Zebra Printer?

Assumed you have a Zebra printer capbable of RFID writing and you have a label stock with integrated RFID tags, TFORMer can help you with RFID programming.
Make sure you use the latest version of TFORMer (8.3 or later). If the RFID Control is not visible in the ribbon (insert section) you have to enable it in the TFORMer OptionsPage ExperimentalRFID. You can insert the RFID control to any position in the layout where your data is available, usually the Detail band. The size of the control is not important.

Decide if you pass the data as Hex codes or as string (may depend on your tag type). For binary data you usually use Hex. If you need Hex codes, you can convert them with BinToHex() and other functions (see function reference). For converting a string to hex codes you can use:

BinToHex(TextToBin("Hello1234", "ANSI", 0), 0)

The control will add the following ZPL commands to the print job:

^RFW‚H‚‚‚^FD<your data>^FS

The Zebra printer should adapt itself to the Tag Type (see also options at printer level). If there are more complex ZPL commands needed for your Tag, you can send them with the ZPL Control directly to the printer (please contact Zebra support for the correct commands needed).

Important: The RFID Control is available (or will work) only with TFORMer printer type ZEBRA! For other printer types, the control is ignored. It acts like a helper to create some basic RFID commands for Zebra/ZPL. For printing through Windows drivers (TFORMer printer type WIN32) you may have options for RFID programming specific to the printer model and manufacturer (e.g. parse text with a specific prefix/post fix or text with a specific font as RFID command) – please contact the printer manufacturers support for details.

First do your media calibration, then run the RFID calibration process. During the process, the printer moves the media, calibrates the RFID tag position, and determines the optimal settings for the RFID media being used.

Directory Permissions for ASP.NET (IIS 7.0+)

Unless you do not work already with impersonation, the PDF creation always takes place on the web server in context of the calling user. This requires that the calling user have sufficient permissions on directory level at calling time.

These are writing permissions on

  • the specified target directory in job.OutputName
  • the temporary directory of the appropriate IIS application pool (e.g. c:\windows\temp at IIS6 and IIS7 classic mode).

Background: With the download of repositories or data files over HTTP, the files are temporarily produced before they are moved into the target directory from the process.

Please read this IIS7 Blog article.