Barcodes with report openoffice

Barcodes with report openoffice

Postby GWindhoff » Mon May 31, 2010 2:01 pm

I have one simple question.

Is it possible to define code 128 barcode with report openoffice.

How can I define that a field (e.g. product.name) will be print out as an code 128 bacode?

Thanks in advance

Winni
GWindhoff
 
Posts: 4
Joined: Mon May 31, 2010 1:57 pm

Re: Barcodes with report openoffice

Postby sraps » Mon May 31, 2010 8:38 pm

Yes, you can create Code 128 by using "make_barcode" function. It's definition is:
Code: Select all
def barcode(code, code_type='EAN13', rotate=None, height=50, xw=1):


"code_type" option should be 'code128'...

I noticed that there is no manual entry for this function, sorry for that - will add that in a while.

Best regards,
Kaspars
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: Barcodes with report openoffice

Postby GWindhoff » Tue Jun 01, 2010 11:22 am

Thanks Kaspar,


and how could I use this function in OpenOffice.

Where should I define the Item to be printed as a barcode?

Winni
GWindhoff
 
Posts: 4
Joined: Mon May 31, 2010 1:57 pm

Re: Barcodes with report openoffice

Postby GWindhoff » Tue Jun 01, 2010 11:29 am

What did I wrong?

TemplateSyntaxError: invalid syntax in expression "{'{urn:oasis:names:tc:opendocument:xmlns:office:1.0}value': barcode [code, code_type='code128', rotate=None, height=50, xw=1].product_id, '{urn:oasis:names:tc:opendocument:xmlns:office:1.0}value-type': __relatorio_guess_type(barcode [code, code_type='code128', rotate=None, height=50, xw=1].product_id)}" of "attrs" directive (, line 1) (/tmp/openoffice-report-0-IjZn.odt, line 1)
GWindhoff
 
Posts: 4
Joined: Mon May 31, 2010 1:57 pm

Re: Barcodes with report openoffice

Postby sraps » Tue Jun 01, 2010 12:17 pm

The directive would look like this:

Code: Select all
<barcode(object.product_id, 'code128')>


Where "object.product_id" is the string you would like to have encoded as barcode. Of course, you do not have to use "<" and ">" marks if you use Text Placeholder field type.
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: Barcodes with report openoffice

Postby sraps » Tue Jun 01, 2010 5:14 pm

Sorry, you have to use Frame, as barcode() function returns image, which is being placed on report. There have been months since used "barcode" last time. :) So the correct code would be:

Code: Select all
image: barcode(object.product_id, 'code128')


For reference, on where you should place this directive, read chapter for the "Frame":
http://kndati.lv/index.php/en/openerp/open-erp-addons/reporting-engine/81-defining-template-directives

Best regards...
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: Barcodes with report openoffice

Postby GWindhoff » Tue Jun 01, 2010 7:59 pm

Thanks!

Your Tool seemed to be very fine.

OpenERP makes no errors now.

But: Openoffice 3.2 can not open the odf file generated by Openerp.

For Openoffice the file is corrupt.

Do you have an Idea? Is Openoffice 3.2 the problem?

Regards
GWindhoff
 
Posts: 4
Joined: Mon May 31, 2010 1:57 pm

Re: Barcodes with report openoffice

Postby sraps » Tue Jun 01, 2010 9:34 pm

Do you use the latest release of "report_openoffice" and "report_openoffice_pdf"? There is a Relatorio bug which is incompatible with OOo 3.2. Our latest modules compensate the bug. Please try to use latest version of Relatorio (v 0.5.5) as well.

If the problem persists, could you post the resulting report, so we could make a "dissection" of it, to find the reason for the problem. :)
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: Barcodes with report openoffice

Postby rubiadia » Fri Sep 16, 2011 2:06 pm

How to create barcodes using excel barcode font? I'm using excel barcode font for barcode 39 and in order to get my scanner to recognize it I have to put an asterick in front, however, when I do this it creates a plus between each of the letters. What can I use to put in front of the text to prevent this and have only my text?
_____________________________
yahoo keyword tool ~ overture ~ traffic estimator ~ adwords traffic estimator
rubiadia
 
Posts: 2
Joined: Fri Sep 16, 2011 1:57 pm

Re: Barcodes with report openoffice

Postby imageat » Wed May 28, 2014 6:07 am

why don't you use a C#.NET barcode generator to create code 128 barcode, simple and easy.
imageat
 
Posts: 1
Joined: Wed May 28, 2014 6:03 am

Next

Return to Aeroo Reports & OpenOffice.org Reporting Engine

cron
Copyright © 2001 Alistek Ltd., ALL RIGHTS RESERVED