Jump to content

Recommended Posts

Posted

Hello,

Is it possible (and if so how to do it) to modify the value exported by the checkboxes exported to PDF ?

To be more precise, when I generate a report in PDF with a checkbox the exported value is "checked" or I would need either the value "yes", "true" or "1".

[PDF Checkbox] export value - checked

Thanks in advance :)

 

PS :

I am currently doing a study to change the report generator and this point is a prerequisite.

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Jasper file code :

<?xml version="1.0" encoding="UTF-8"?>

<!-- Created with Jaspersoft Studio version 6.20.0.final using JasperReports Library version 6.20.0-2bc7ab61c56f459e8176eb05c7705e145cd400ad  -->

<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="POC" pageWidth="595" pageHeight="841" columnWidth="511" leftMargin="42" rightMargin="42" topMargin="42" bottomMargin="5" uuid="53c6b4bc-93bf-42db-a75d-6df970409bc5">

    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>

    <property name="com.jaspersoft.studio.unit." value="mm"/>

    <property name="com.jaspersoft.studio.unit.pageHeight" value="mm"/>

    <property name="com.jaspersoft.studio.unit.pageWidth" value="mm"/>

    <property name="com.jaspersoft.studio.unit.topMargin" value="mm"/>

    <property name="com.jaspersoft.studio.unit.bottomMargin" value="mm"/>

    <property name="com.jaspersoft.studio.unit.leftMargin" value="mm"/>

    <property name="com.jaspersoft.studio.unit.rightMargin" value="mm"/>

    <property name="com.jaspersoft.studio.unit.columnWidth" value="mm"/>

    <property name="com.jaspersoft.studio.unit.columnSpacing" value="mm"/>

    <subDataset name="Dataset1" uuid="46c51e9d-d501-4a1f-8d03-026b41e82401">

        <queryString>

            <![CDATA[]]>

        </queryString>

    </subDataset>

    <queryString>

        <![CDATA[]]>

    </queryString>

    <background>

        <band splitType="Stretch"/>

    </background>

    <title>

        <band height="79" splitType="Stretch"/>

    </title>

    <pageHeader>

        <band height="35" splitType="Stretch"/>

    </pageHeader>

    <columnHeader>

        <band height="61" splitType="Stretch"/>

    </columnHeader>

    <detail>

        <band height="125" splitType="Stretch">

            <textField>

                <reportElement x="60" y="35" width="31" height="11" uuid="f4ecc455-76d8-42e1-ab7d-375eec0777ff">

                    <property name="net.sf.jasperreports.export.pdf.field.check.type" value="Check"/>

                    <property name="net.sf.jasperreports.export.pdf.field.border.style" value="Solid"/>

                    <property name="net.sf.jasperreports.export.pdf.field.type" value="Check"/>

                    <property name="net.sf.jasperreports.export.pdf.field.value" value=""/>

                    <property name="net.sf.jasperreports.export.pdf.field.name" value="CheckboxId"/>

                </reportElement>

                <box>

                    <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>

                    <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>

                    <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>

                    <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>

                </box>

                <textFieldExpression><![CDATA["Text Field"]]></textFieldExpression>

            </textField>

        </band>

    </detail>

    <columnFooter>

        <band height="45" splitType="Stretch"/>

    </columnFooter>

    <pageFooter>

        <band height="54" splitType="Stretch"/>

    </pageFooter>

    <summary>

        <band height="42" splitType="Stretch"/>

    </summary>

</jasperReport>

 

  • 2 months later...

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...