Jump to content
Changes to the Jaspersoft community edition download ×

blank rows in table


scanny

Recommended Posts

I have a table with two columns and one field in each column.  I only want the fields and rows to print when a third field equals a specific value.  I have it so the fields only print, but the rest of the rows show up blank.  I have checked the boxes don't print when blank and when null make blank.  I've also tried every combination of this. Please help.

Code:
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">					<datasetRun subDataset="Table Dataset 1">						<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{xrefs})]]></dataSourceExpression>					</datasetRun>					<jr:column width="72">						<jr:columnHeader style="table 1_CH" height="19" rowSpan="1">							<staticText>								<reportElement x="0" y="0" width="71" height="15"/>								<textElement textAlignment="Center">									<font isBold="true"/>								</textElement>								<text><![CDATA[AID]]></text>							</staticText>						</jr:columnHeader>						<jr:detailCell style="table 1_TD" height="15" rowSpan="1">							<textField isStretchWithOverflow="true" isBlankWhenNull="true">								<reportElement x="0" y="0" width="71" height="12" isRemoveLineWhenBlank="true">									<printWhenExpression><![CDATA[$F{xrefType}.equals( "AID" )]]></printWhenExpression>								</reportElement>								<textElement textAlignment="Center">									<font fontName="Times New Roman" size="8"/>								</textElement>								<textFieldExpression class="java.lang.String"><![CDATA[""+$F{xrefValue}]]></textFieldExpression>							</textField>						</jr:detailCell>					</jr:column>					<jr:column width="258">						<jr:columnHeader style="table 1_CH" height="19" rowSpan="1">							<staticText>								<reportElement x="14" y="0" width="236" height="15"/>								<textElement textAlignment="Center">									<font isBold="true"/>								</textElement>								<text><![CDATA[Comment]]></text>							</staticText>						</jr:columnHeader>						<jr:detailCell style="table 1_TD" height="15" rowSpan="1">							<textField isStretchWithOverflow="true" isBlankWhenNull="true">								<reportElement x="14" y="0" width="236" height="12">									<printWhenExpression><![CDATA[$F{xrefType}.equals( "AID" ) && $F{xrefComment} != null]]></printWhenExpression>								</reportElement>								<textElement>									<font size="8"/>								</textElement>								<textFieldExpression class="java.lang.String"><![CDATA[$F{xrefComment}]]></textFieldExpression>							</textField>						</jr:detailCell>					</jr:column>				</jr:table>
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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