How can I collate or print multiple copies for record in order with BarTender? Follow

Avatar
Alessandro De Vittorio

Question

Let's assume that your BarTender document is currently linked to a SQL Server Database that consists of a table with 3 rows and that you want to print multiple copies for each record; in what order my labels will be printed by BarTender?

Applicable to 

BarTender Designer 2016 and later

Answer

Based on the number of copies requested, BarTender will print all the copies of record 1, then all the copies of record 2 and so on for each selected record. So, if you've specified to print two copies per record, in this case, the printout outcome will be in this order: 1, 1, 2, 2, 3, 3

BarTender does not support collate printing, that means there isn't any option to select that makes BarTender running the print job in its entirety once and then repeat, so to get the following sets of copies:  1, 2, 3, 1, 2, 3 

However, even though such option is not natively supported in BarTender, below is discussed a possible method to overcome such limitation.

For example, supposing the table 'A' shown in the the FIGURE 1-1 is the current table linked to a BarTender document and, the table 'B' is a copy of the table 'A', if you combine one to each other, you'll be able to print all records of each copy before printing the second copy.

 FIGURE 1-1

In BarTender this can be done with a Custom SQL statement (FIGURE 1-2) and it doesn't require to make any change at your database file or table stored on the database system. You can use the SQL UNION ALL operator to combine the result sets of 2 or more SELECT statement (FIGURE 1-3) . The data returned is stored and shown in a single table. 

 

SELECT column1, column2, ... FROM table_A;

UNION ALL
SELECT column1, column2, ... FROM table_A;

 

FIGURE 1-2

​​mceclip0.png

FIGURE 1-3 

mceclip1.png

More Information

*Depending on how many duplicate rows you want to print, the UNION ALL operator may have to be used more than once and placed between the same SELECT statement.

*In order to include duplicate records you have to use UNION ALL instead of UNION.

*This method has a number of limitations:

  • In BarTender, the Specify a custom SQL statement (Advanced) option is supported for some database types only.
  • It could be tricky to specify a custom SQL Statement in BarTender with a complex SQL query.

Do you have feedback or questions on this article? We encourage you to post them on our Community Forums