Label printer problem on upgrade

Hi All,

Thanks first Tim for help installing 1.5 beta1. Did the trick.

Since install have lost label printer functionality. Been using a QL570 Brother without problem for over a year. One gentle user so has survived well.

Problem is its set up to 62 mm continuous tape yet since 1.5 Beta installed all label templates are resulting in sending

a 'jasper reports - label **** 58 mm Dia' to the printer regardless of what label jrxml I try and this generates a size incompatible at the printer. looking at the report under printers it has the label as 58 diam and 58 width?

All the printer settings themselves are correct but I cant get 62 mm to setup in the Jasper report -label ****.

Any ideas would be appreciated.

Cheers Geoff

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Label printer problem on upgrade

We do use more recent version of jasper reports in 1.5, but I can't say if that is the cause.

If you open the label template in iReport (preferable 3.x or higher), you can check/update the template's page format.

This is done via the Format ->Page format menu.

If I understand you correctly, it should have:

* Format: Custom

* Width: 58 mm

* Height: 62 mm

 

If not, change appropriately, save, and upload the template to OpenVPMS.

 

-Tim

Re: Label printer problem on upgrade

Thanks Tim,

Not so simple Im afraid. Problem only with 1.5 Beta1. Label printing works perfectly 1.4. Upgraded production system before noticed label problem and had to restore to 1.4 as couldnt resolve.

So identical problem XP pro and Vista. Tried ireport 4.01 and setting page format but didnt help.

Label is 62mm wide continuous tape. The label printer prints from all other applications as expected and automatically cuts to the size of generated label.

It also prints perfectly from the openvpms label preview via pdf to the label printer.In this case the Printer Document Properties show label width to be 62 mm and length set to 38mm with ownership of the document being Vista login account as it should.

Problem comes with direct printing from the OK button. For some reason openvpms generates a document 58mm dia width and 58 mm height despite the openvpms template settings being set to custom 62/38. Doesnt make a difference if no format settings used in openvpms. All label printer settings are set for 62/38 via administrator.

This 58 diam document is rejected by the label printer as it doesnt match the installed label tape.

58 dia is infact a genuine label size for CD/DVD labels but why 1.5 latches onto this format and links it to the label is bewildering.

Ive attached the document properties from the printers folder for the labels that wont print. Note that this label was modified from an Epson template but Ive tried freshly designed labels and regardless of size theyre leading to the same 58mm dia output.

I note ownership of these is openvpms. (You cant alter the properties of the documents once theyve reached this point as theyve already been generated.).

As the printer works without problem with 1.4 I assume that some change under the hood in 1.5 is influencing the formating of labels.

(Note that Ive found that installing/upgrading Openvpms 1.5 requires Java 6 as the application wouldnt serve for me with Java 5.)

Thanks Geoff

 

AttachmentSize
Labelproperties.odt 352.71 KB

Re: Label printer problem on upgrade

What happens if you try and print the label from iReport?

Alternatively, the problem may be related to the newer java or jasper report versions.

You can determine if its jasper reports by replacing the jasper reports jar in 1.5 with that from 1.4.

Assuming you have 1.5 installed and deployed:

1. shut down tomcat

2. remove $TOMCAT_HOME/webapps/openvpms/WEB-INF/lib/jasperreports-3.7.6.jar

3. copy $OPENVPMS_1_4/lib/jasperreports-3.6.0.jar $TOMCAT_HOME/webapps/openvpms/WEB-INF/lib/

4. restart tomcat

(Replace $TOMCAT_HOME with your tomcat install path, and $OPENVPMS_1_4 with your OpenVPMS 1.4 install path)

Now try and print a label from OpenVPMS.

 

-Tim

Re: Label printer problem on upgrade

Thanks Tim,

Yep its the newer jasper reports that is causing the problem. Labels print perfectly after swapping j-r 3.7.6 with j-r 3.6.0.

Am I OK just running with the earlier version or should I be aiming to get things working under the newer version.

Cheers Geoff

Re: Label printer problem on upgrade

I don't want to roll back to 3.6.0, due to the problem reported in https://openvpms.atlassian.net/browse/REP-13

Could you try the latest jasper reports version: http://repo1.maven.org/maven2/net/sf/jasperreports/jasperreports/4.0.1/j...

Make sure you remove the existing 3.6.0 version from the WEB-INF/lib directory.

-Tim

Re: Label printer problem on upgrade

Hi Tim,

No the latest jasperreport 4.0.1 gives the same label printer problem that j-r 3.7.6 did. However version jasperreport-3.6.1.jar does let the label printer do its thing.

As this version fixed the j-r bug mentioned in the jira hopefully this will be ok assuming there arent any other significant changes in more recent j-r versions that are pertinent to openvpms.

Thanks Geoff

PS: Out of interest .

Tested other versions - QL550/570 printer will print from the OK button  up to and including J-r 3.7.3 but not higher versions of Jasper report. (Label printer prints fine from preview regardless of j-r version.

The release notes for J-r 3.7.4 are:

JasperReports 3.7.4 Change Log
===================================

- new spider/radar chart added as custom component;

- the scope of the "frames as nested tables" configuration properties was extended
to frame element level;

- new entries added to Sample Reference documentation;

- minor bug fixes and improvements;

?
 

 

Re: Label printer problem on upgrade

I'll take a look at the source code changes between 3.7.3 and 3.7.4.

Can you send me your report template so I can test?

Send to tma_at_netspace_net_au

-Tim

Re: Label printer problem on upgrade

Hi Geoff

Do you have a working label template for your Brother label printer? If so, are you able to post it?

I've got one that will print out nicely if previewed first and then printed via acrobat.

I'm using the 62mm continuous tape as well.

I've attached it here if anyone can see where I've got wrong.

Cheers

John

AttachmentSize
label brother.jrxml 11.32 KB

Re: Label printer problem on upgrade

I've had a similar problem since I started using openVPMS 2 years ago, one which I've never been able to solve.  I can't print anything correctly where the template (=label) is wider than high: it truncates the right side of the label.  We now output ID labels to Acrobat via Preview and print perfectly from Acrobat, but you can't do that with dispensing labels: we have an OpenOffice (OO) window open and prepare dispensing labels manually for every client - a real PITA.  All labels print correctly from OO and Acrobat, but not from within OV. 

I  described the problem here: http://www.openvpms.org/forum/issues-label-printing.

Re: Label printer problem on upgrade

OpenOffice templates are handled a little differently to JasperReports templates.

For OpenOffice templates, the Paper Size, Orientation, Paper Height, Paper Width, and Paper Units settings of the Document Template are ignored. These settings must be specified within the OpenOffice document.

If memory serves, these settings were only added to support Jasper Reports in conjunction with recalcitrant label printers.

When you print from Acrobat, or OpenOffice, do you have to change any of the print settings?

-Tim

Re: Label printer problem on upgrade

Tim A - a minor hijack of the topic. Does the 'paper size etc ignored - must be set in the template' remark also apply to Microsoft Word templates? [Clarification needed for the CSH text]

Regards, Tim G

Re: Label printer problem on upgrade

Yes. Document merging and printing of OpenOffice and Word templates all happens through OpenOffice. For both these document types, the Document Template settings are ignored.

Jasper Reports templates are handled solely by Jasper Reports, and use the Document Template settings.

-Tim

Re: Label printer problem on upgrade

Hi Yuri,

I have seen this issue before and it seems to be due to some strange behaviour in jasper reports.  In IReport if you set the report width > report height the orientation automatically changes to Landscape.  If you change orientation back to Portrait the width and height reverse.  The problem is if the orientation in the label template is landscape it cuts off the right as though the actual orientation is portrait.  This is independent of the orientation you set against the label template in OpenVPMS.

The only way I have been able to resolve this is to edit the jrxml file directly and change the orientation entry back to Portrait.  If you change the report size settings in IReport again you need to repeat the edit as the orientation will revert to Landscape.  This tends to work but is annoying and messy.  I have no idea why on this is the case for this template.  

Cheers Tony

Syndicate content