views:

18

answers:

1

Hi All,

Does anybody here knew where can I download the schema references for the barcode component of Jasperreports?

I am thinking of using either the Barbecue or BarcodeForJ component but my problem is, I cannot find the schema for both component.

I have tried guessing this: I wanted to increase the Font Size of the human readable component.

<c:Code39 hrSize="10">
    <c:codeExpression><![CDATA["TESTING"]]></c:codeExpression>
</c:Code39>

But is says it cannot find the attribute for the element c:Code39. Any help or link where I can download this?

When I download jasperreport, I saw the schema reference for the Jasper Library but not with its component. Please help..

+1  A: 

I haven't tested this, but reading the source would lead me to believe this should work.

What you will want to do is define a style for your sibling reportElement.

<componentElement>
    <reportElement style="Barcode" x="130" y="250" width="400" height="30"/>
    <c:Code39>
        <c:codeExpression><![CDATA["TESTING"]]></c:codeExpression>
    </c:Code39>
</componentElement>

Where the Barcode style definition's font properties are propagated to Barcode4j's font-name and font-size properties.

<style name="Barcode" isDefault="false" fontName="DejaVu Sans" fontSize="10"/>

Take a look at AbstractBarcodeEvaluator.setBaseAttributes() method found here.

Jordan S. Jones
@Jordan. Thanks thanks.. That did the trick.. You saved my life =). I have been studying JasperReports for days now, all I can say is that its very powerful but its kinda lack a good project documentation. I look at the JasperReport Site and I notice that the schema reference for the barcode component is still to come. Anyways, thanks a lot sir!
Mark Estrada
@Mark Estrada - No problem at all.. I was in your shoes about 3 months ago. I spent a lot of time going through the source code, and there are still things that cause me to sit back and scratch my head. One thing I can recommend, is to download iReport from the JasperForge site until you get a really good handle of the markup structure.
Jordan S. Jones