Hello everyone,
v7.10.1
Finishing up some labels and running into what I think is either a bug (unlikely), or something I have missed (more likely). I have added 1,63-preparations.preparation.remarks
to my report, in the same manner as any other field, but it is displaying as null
in the report when rendered by Specify, despite there being data for that field. The same thing happens when I add other fields from the preparations table. Other tables are rendering as expected.
Label
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.21.2.final using JasperReports Library version 6.21.2-8434a0bd7c3bbc37cbf916f2968d35e4b165821a -->
<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="Nigerian Birds" columnCount="3" pageWidth="612" pageHeight="792" whenNoDataType="NoPages" columnWidth="174" columnSpacing="14" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" uuid="8e2bd8fa-bd7c-47dc-9a89-1f48374f248f">
<property name="com.jaspersoft.studio.unit.columnSpacing" value="mm"/>
<import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/>
<import value="net.sf.jasperreports.engine.data.*"/>
<field name="1.collectionobject.catalogNumber" class="java.lang.String"/>
<field name="1,9-determinations.determination.alternateName" class="java.lang.String"/>
<field name="1,9-determinations,4-preferredTaxon.taxon.Genus" class="java.lang.String"/>
<field name="1,9-determinations,4-preferredTaxon.taxon.Species" class="java.lang.String"/>
<field name="1,9-determinations,4.taxon.Subspecies" class="java.lang.String"/>
<field name="1,10.collectingevent.startDate" class="java.lang.String"/>
<field name="1,93.collectionobjectattribute.text1" class="java.lang.String"/>
<field name="1,10,2.locality.localityName" class="java.lang.String"/>
<field name="1,10.collectingevent.text6" class="java.lang.String"/>
<field name="id" class="java.lang.Integer"/>
<field name="resultsetsize" class="java.lang.String"/>
<field name="1,93.collectionobjectattribute.text33" class="java.lang.String">
<fieldDescription><![CDATA[Age]]></fieldDescription>
</field>
<field name="1,10.collectingevent.startDateNumericYear" class="java.lang.String">
<fieldDescription><![CDATA[Start date year]]></fieldDescription>
</field>
<field name="1,10.collectingevent.startDateNumericMonth" class="java.lang.String">
<fieldDescription><![CDATA[Start date month]]></fieldDescription>
</field>
<field name="1,10.collectingevent.endDateNumericYear" class="java.lang.String"/>
<field name="1,63-preparations.preparation.remarks" class="java.lang.String">
<fieldDescription><![CDATA[prep remarks]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="58" splitType="Stretch">
<rectangle>
<reportElement mode="Transparent" x="0" y="0" width="170" height="56" uuid="8da4d884-b86a-4d13-aa6b-405d4357d3d2"/>
</rectangle>
<textField>
<reportElement x="20" y="0" width="20" height="56" uuid="8af99c2d-b2bc-494a-a59e-0ce08a4995c0">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
</reportElement>
<textElement textAlignment="Center" rotation="Left">
<font size="10" isBold="true"/>
<paragraph leftIndent="2"/>
</textElement>
<textFieldExpression><![CDATA[$F{1.collectionobject.catalogNumber}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="40" y="32" width="130" height="12" uuid="665c8d65-c4b4-40f5-9579-7608083ae5ca"/>
<textElement verticalAlignment="Bottom" markup="styled">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA["<style isItalic='true' isBold='true'>" + ($F{1,9-determinations,4-preferredTaxon.taxon.Genus}==null?"":$F{1,9-determinations,4-preferredTaxon.taxon.Genus}) + " " + ($F{1,9-determinations,4-preferredTaxon.taxon.Species}==null?"":$F{1,9-determinations,4-preferredTaxon.taxon.Species}) + " " + ($F{1,9-determinations,4.taxon.Subspecies}==null?"":$F{1,9-determinations,4.taxon.Subspecies}) +"</style>"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="40" y="44" width="130" height="10" uuid="70017e64-cfb7-4716-9742-413d6aebbe5d">
<property name="com.jaspersoft.studio.unit.spacingAfter" value="px"/>
</reportElement>
<textElement verticalAlignment="Bottom">
<font size="8"/>
<paragraph spacingAfter="0"/>
</textElement>
<textFieldExpression><![CDATA[$F{1,9-determinations.determination.alternateName}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="40" y="1" width="90" height="10" uuid="6a625620-1008-4e71-b11e-2caf3b714e61">
<property name="com.jaspersoft.studio.unit.spacingBefore" value="px"/>
</reportElement>
<textElement>
<font size="7" isItalic="true"/>
<paragraph spacingBefore="0"/>
</textElement>
<text><![CDATA[Cowan Tetrapod Collection]]></text>
</staticText>
<textField>
<reportElement x="100" y="21" width="70" height="10" uuid="319d4f86-6165-4306-827f-610fc862bd73">
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
</reportElement>
<textElement textAlignment="Right">
<font size="8"/>
<paragraph rightIndent="3"/>
</textElement>
<textFieldExpression><![CDATA[($F{1,10.collectingevent.startDateNumericYear}==null?"":($F{1,10.collectingevent.endDateNumericYear}==null?(($F{1,10.collectingevent.startDateNumericMonth}.equals("1")?$F{1,10.collectingevent.startDateNumericYear} + "-Jan":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("2")?$F{1,10.collectingevent.startDateNumericYear} + "-Feb":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("3")?$F{1,10.collectingevent.startDateNumericYear} + "-Mar":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("4")?$F{1,10.collectingevent.startDateNumericYear} + "-Apr":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("5")?$F{1,10.collectingevent.startDateNumericYear} + "-May":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("6")?$F{1,10.collectingevent.startDateNumericYear} + "-Jun":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("7")?$F{1,10.collectingevent.startDateNumericYear} + "-Jul":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("8")?$F{1,10.collectingevent.startDateNumericYear} + "-Aug":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("9")?$F{1,10.collectingevent.startDateNumericYear} + "- Sept":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("10")?$F{1,10.collectingevent.startDateNumericYear} + "-Oct":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("11")?$F{1,10.collectingevent.startDateNumericYear} + "-Nov":"") + ($F{1,10.collectingevent.startDateNumericMonth}.equals("12")?$F{1,10.collectingevent.startDateNumericYear} + "-Dec":"")):$F{1,10.collectingevent.startDateNumericYear} + "-" + $F{1,10.collectingevent.endDateNumericYear}))]]></textFieldExpression>
</textField>
<rectangle>
<reportElement x="0" y="0" width="20" height="56" uuid="b5c106b2-0b04-407e-affd-2376ce7cd830"/>
</rectangle>
<textField isBlankWhenNull="true">
<reportElement x="130" y="0" width="40" height="18" uuid="dd4cf093-287d-492e-a34a-59cacd0b90a4">
<property name="com.jaspersoft.studio.unit.spacingAfter" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Middle" markup="styled">
<font size="8"/>
<paragraph rightIndent="5" spacingAfter="0"/>
</textElement>
<textFieldExpression><![CDATA[($F{1,93.collectionobjectattribute.text1}.equals("Male")?"\u2642":"") + ($F{1,93.collectionobjectattribute.text1}.equals("Female")?"\u2640":"") + " " + ($F{1,93.collectionobjectattribute.text33}==null?"":$F{1,93.collectionobjectattribute.text33})]]></textFieldExpression>
</textField>
<line>
<reportElement x="37" y="0" width="1" height="56" uuid="d3d8db73-66e7-430e-9a7f-d9dfd7554235"/>
</line>
<textField>
<reportElement x="40" y="11" width="70" height="10" uuid="99b8b425-5713-49f0-a20a-16c489817aaa"/>
<textElement>
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{1,63-preparations.preparation.remarks}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>
Query:
Label rendered: