LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report Toolkit Standard Report Print Problem

We are trying to print a label out on a Zebra QL220+ Thermal Printer.  Using the Report Generation Toolkit and selecting the Report Type as "WORD" it works fine.  However by ONLY changing the Report Type to "STANDARD REPORT" it still prints out the label OK, but then scrolls out another blank label - it's like some sort of form feed character/command is somehow being appended.

We don't want to use the WORD Report Type, because I assume we have to install MS Office, which we don't want.

As you can see from the attached VI, it is just some very basic text that we are writing to the Label.

Is there some way we can see what data is actually being sent to the Printer for the two different Report Types?

Chris

 

0 Kudos
Message 1 of 5
(3,147 Views)

Hi chris,

 

Have you tried printing to any other printer or even a PDF or xps document creator? Do these also print out an extra page when setting to standard report?

 

<Brian A | Applications Engineering | National Instruments> 

0 Kudos
Message 2 of 5
(3,122 Views)

Might I suggest that you send native CPCL commands to the printer. The report generator is not really geared for working with label printers. I have experienced problems with using the report generator in the past. Using the native print language will provide much more capable than you will find with the report generator and it will most likely be faster.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 5
(3,120 Views)

If your printer is networked you would open a TCP connection on port 6101 to the printer. If serial simply send the data via normal VISA commands.

 

Here is the CPCL for the one example label in your code:

 

! 0 200 200 440 1
TEXT 0 2 10 10 Date: <DATE>
TEXT 0 2 10 30 Time: <TIME>
TEXT 0 2 10 50 Operator: <INITIALS>
TEXT 0 2 10 70 Location: <LOCATION>
TEXT 0 2 10 90 Reason: <REASON>
TEXT 0 2 10 110 Post Comment: <COMMENT>
TEXT 0 2 10 130 S/N: <SN>
TEXT 0 2 10 150 Dryness Fraction:
TEXT 0 2 10 170 Signature:
LINE 100 190 300 190 1
PRINT

 

In the above label you would programmatically replace the "<x>" fields with the actual data you wanted printed. For your multiple S/Ns you would use a loop to add the lines with each S/N.

 

From the CPCL manual here are the pages for the elements I used above:

TEXT Commands
The TEXT command is used to place text on a label. This
command and its variants control the specific font number
and size used, the location of the text on the label,
and the orientation of this text. Standard resident fonts
can be rotated to 90° increments as shown in the example.
Format:
{command} {font} {size} {x} {y} {data}
where:
{command}: Choose from the following:
TEXT Prints text horizontally.
(or T)
VTEXT Prints text (vertically) rotated 90
(or VT) degrees counterclockwise.
TEXT90 (Same as VTEXT above.)
(or T90)
TEXT180 Prints text (upside down) rotated
(or T180) 180 degrees counterclockwise.
TEXT270 Prints text (vertically) rotated 270
(or T270) degrees counterclockwise.
{font}: Name/number of the font.
{size}: Size identifier for the font.
{x}: Horizontal starting position.
{y}: Vertical starting position.

{data}: The text to be printed.

 

LINE Commands
Lines of any length, thickness, and angular orientation
can be drawn using the LINE command.
Format:
{command} {x0} {y0} {x1} {y1} {width}
where:
{command}: Choose from the following:
LINE Prints a line.
(or L)
{x0}: X-coordinate of the top-left corner.
{y0}: Y-coordinate of the top-left corner.
{x1}: X-coordinate of:
- top right corner for horizontal.
- bottom left corner for vertical.
{y1}: Y-coordinate of:
- top right corner for horizontal.
- bottom left corner for vertical.
{width}: Unit-width (or thickness) of the line.

 

<!> {offset} <200> <200> {height} {qty}
where:
<!>: Use '!' to begin a control session.
{offset}: The horizontal offset for the entire label.
This value causes all fields to be offset
horizontally by the specified number of
UNITS.
<200>: Horizontal resolution (in dots-per-inch).
<200>: Vertical resolution (in dots-per-inch).
{height}: The maximum height of the label.
The maximum label height is calculated by measuring
from the bottom of the first black bar (or
label gap) to the top of the next black bar (or label
gap). Then 1/16” [1.5mm] is subtracted from this
distance to obtain the maximum height. (In dots:
subtract 12 dots on 203 d.p.i printers; 18 dots on
306 d.p.i. printers)

{qty}: Quantity of labels to be printed.
Maximum = 1024.

 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 4 of 5
(3,114 Views)

Hi Mark,

I'm working in parallel with Greg Nicholls and we will be trying your USB solution posted here - thanks.

 

 
Chris
0 Kudos
Message 5 of 5
(3,108 Views)