Jump to content
We've recently updated our Privacy Statement, available here ×

Zebra Printing


matthall

Recommended Posts

[EDIT 13/04/12 11:20: Summary; Need new line / carriage return character for printing to Zebra printer]

 

Hi,

My colleague and I are new to iReports but are attempting to replicate some output that we currently have from StreamServe in the iReports environment.

In particular (and the reason I am here) printing despatch labels on a Zebra printer.

We are trying to print the address in standard address format on multiple rows. Each row may or may not have data. e.g:

Name = Mr Bishop

Address1 = Honeydew Road

Town = Leicester

County (null)

PostCode = LE9 2RR

We'd want this to discount the null line (wherever it appears) and build up an address without ny blank lines e.e

Mr Bishop

Honeydew Road

Leicester

LE9 2RR

We've achieved this by passing the fields through an if statement within individual variables and building them into a final variable for the address.

$V{NAME}                $F{NAME}!="#"?$F{NAME} +"n":""

$V{ADDRESS1}        $F{ADDRESS1}!="#"?$V{Name} + $F{ADDRESS1} + "n":$V{Name}

$V{TOWN}                $F{TOWN}!="#"?$V{ADDRESS1} + $F{TOWN} + "rn":$V{ADDRESS1}

.... and so on...

The difficulty comes from getting this fully formed address variable to output on separate lines.

As you can see we are attempting to use the java n andor rn commands to do this and in iReports it outputs correctly. Having published to our host system (for info: Red Prairie Dispatcher) the label printed via a Zebra printer just outputs each line one on top of another.

I'm hoping that someone has experienced (and overcome) a similar issue and might advise.

Many thanks,

MattHall

 

Code:


Post Edited by matthall at 04/13/2012 10:21
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

I have tried all kinds of control characters none to any avail so still wondering if anyone mightt assist.

In general printing to a Zebra printer (via Red Prairie Dispatcher) seems to be troublesome so any general advice or direction to useful guides in this field would be most welcome

Link to comment
Share on other sites

If I understand correctly, you are trying to deal with "null" rows on the report (in this case a label), is that correct?

If so, have you checked out the parameters on the textboxes that contain the $F{<fieldname>} information?  There should a parameter that is called "Remove line when blank".  If you check this option, the form should automatically handle the moving of data around for you by just not even trying to print that line of information.

Hope this helps.  Good luck!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...