How to add leading zeroes on tickets

NOTE: This post is intended for internal use only.

A Wintix user needed to print tickets in quantities greater than 10,000 tickets. They also needed to number them with a 4 digit number. They wanted to print numbers from 00001 to 40,000.

The seat_column field is the obvious field to use. But, they could only put in 4 digits.

They did the following:

  • Created a seating plan 200 wide and 200 high (200 times 200 = 40,000)
  • Widened the seat_column field to 6 characters wide (to fit the larger numbers). We used the command”
    ALTER TABLE `mapa_suarez` MODIFY COLUMN seat_collmĀ  char(6) NOT NULL DEFAULT ''
    This was entered in the 'Export email' section.
  • Used the re-numbering function in Wintix to put in new numbers
  • We created a new show and attached the new plan to it
  • We modified the ticket format to print the new data

_________________________________________________________

The easiest way to do this is with the built-in functions. It looked like this:

val

The properties tabs look like this:

val2

and:

val3

Explanation:
The val() changes the column variable to a number. Then, Wintix treats it like a number.

There is another way to do this. You could enter a new field and put this formula in the ‘Expression’ field:
right( “0000” + alltrim(column), 5 )

This trims the leading and trailing blanks of the column variable and adds “0000” to the beginning. Then, the right() functions tells Wintix to only display the right 5 digits.

You can use either method. They both display the same results:

val4

One thing you must do is widen the seat_collm field in whatever seating plan you are using.

This entry was posted in Tickets and tagged . Bookmark the permalink.

Leave a Reply