gpt4 book ai didi

jasper-reports - 未显示 Jasper 子报告

转载 作者:行者123 更新时间:2023-12-04 16:48:23 25 4
gpt4 key购买 nike

我有一个主要报告调用 2 个不同的子报告,两次,每次使用不同的参数

问题是显示不正确。LETTEROFACK_TRANSF_LTR ,根本不会来

<jasperReport name="LETTEROFACK" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="612" pageHeight="792" columnWidth="484" columnSpacing="0" leftMargin="64" rightMargin="64" topMargin="20" bottomMargin="0" whenNoDataType="NoPages" isTitleNewPage="false"          isSummaryNewPage="true">

<queryString><![CDATA[......]]></queryString>

<field name="GRP_ID" class="java.lang.String"/>
<field name="DATE_VALUE" class="java.lang.String"/>
<field name="PERSON_ID_AT" class="java.lang.String"/>
<field name="PERSON_ID_AF" class="java.lang.String"/>
<field name="AT_PRIM_SALUTATION" class="java.lang.String"/>
<field name="AT_HF_GREETING" class="java.lang.String"/>
<field name="AT_FIRST_NAME" class="java.lang.String"/>
<field name="AT_MIDDLE_NAME" class="java.lang.String"/>
<field name="AT_LAST_NAME" class="java.lang.String"/>
<field name="AT_PRIMARY_ORG" class="java.lang.String"/>
<field name="AT_ADDRESS1" class="java.lang.String"/>
<field name="AF_PRIM_SALUTATION" class="java.lang.String"/>
<field name="AF_HF_GREETING" class="java.lang.String"/>
<field name="AF_FIRST_NAME" class="java.lang.String"/>
<field name="AF_MIDDLE_NAME" class="java.lang.String"/>
<field name="AF_LAST_NAME" class="java.lang.String"/>
<field name="AF_PRIMARY_ORG" class="java.lang.String"/>
<field name="AF_ADDRESS1" class="java.lang.String"/>
<field name="AF_PRIMARY_LOGIN" class="java.lang.String"/>
<field name="AT_NOMINEE_NAME" class="java.lang.String"/>
<field name="AF_NOMINEE_NAME" class="java.lang.String"/>
<field name="FUND_NAME" class="java.lang.String"/>
<field name="TRANSFER_AMT" class="java.lang.String"/>
<field name="TRANSFER_DATE" class="java.lang.String"/>
<field name="TRANSFER_DATE1" class="java.lang.String"/>
<detail>
<band height="630" isSplitAllowed="true" >
<break>
<reportElement
x="0"
y="129"
width="484"
height="0"
key="element-1"/>
</break>
<subreport isUsingCache="true">
<reportElement
x="10"
y="156"
width="199"
height="77"
key="subreport-2"
isRemoveLineWhenBlank="true"/>
<subreportParameter name="FUND_NAME">
<subreportParameterExpression><![CDATA[$F{FUND_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="TRANSFER_DATE">
<subreportParameterExpression><![CDATA[$F{TRANSFER_DATE1}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="REPORT_BASE_DIR">
<subreportParameterExpression><![CDATA[$P{REPORT_BASE_DIR}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression class="java.lang.String"><![CDATA[$P{REPORT_BASE_DIR}+"LETTEROFACK_SUB.jasper"]]></subreportExpression>
</subreport>
<break>
<reportElement
x="0"
y="280"
width="484"
height="0"
key="element-2"/>
</break>
<break>
<reportElement
x="0"
y="452"
width="484"
height="0"
key="element-3"/>
</break>
<subreport isUsingCache="true">
<reportElement
x="12"
y="478"
width="199"
height="73"
key="subreport-4"
isRemoveLineWhenBlank="true"/>
<subreportParameter name="FUND_NAME">
<subreportParameterExpression><![CDATA[$F{FUND_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="TRANSFER_DATE">
<subreportParameterExpression><![CDATA[$F{TRANSFER_DATE1}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="REPORT_BASE_DIR">
<subreportParameterExpression><![CDATA[$P{REPORT_BASE_DIR}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression class="java.lang.String"><![CDATA[$P{REPORT_BASE_DIR}+"LETTEROFACK_SUB.jasper"]]></subreportExpression>
</subreport>
<subreport isUsingCache="true">
<reportElement
x="10"
y="14"
width="199"
height="71"
key="subreport-1"
isRemoveLineWhenBlank="true"/>
<subreportParameter name="DATE_VALUE">
<subreportParameterExpression><![CDATA[$F{DATE_VALUE}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="PRIM_SALUTATION">
<subreportParameterExpression><![CDATA[$F{AF_PRIM_SALUTATION}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="HF_GREETING">
<subreportParameterExpression><![CDATA[$F{AF_HF_GREETING}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="FIRST_NAME">
<subreportParameterExpression><![CDATA[$F{AF_FIRST_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="MIDDLE_NAME">
<subreportParameterExpression><![CDATA[$F{AF_MIDDLE_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="LAST_NAME">
<subreportParameterExpression><![CDATA[$F{AF_LAST_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="PRIMARY_ORG">
<subreportParameterExpression><![CDATA[$F{AF_PRIMARY_ORG}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="ADDRESS1">
<subreportParameterExpression><![CDATA[$F{AF_ADDRESS1}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="NOMINEE_NAME">
<subreportParameterExpression><![CDATA[$F{AF_NOMINEE_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="TRANSFERRED_FROM">
<subreportParameterExpression><![CDATA[$F{AT_FIRST_NAME}+($F{AT_MIDDLE_NAME} != null ? " "+$F{AT_MIDDLE_NAME}:"")+" "+$F{AT_LAST_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="TRANSFERRED_TO">
<subreportParameterExpression><![CDATA[$F{AF_FIRST_NAME}+($F{AF_MIDDLE_NAME} != null ? " "+$F{AF_MIDDLE_NAME}:"")+" "+$F{AF_LAST_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="FUND_NAME">
<subreportParameterExpression><![CDATA[$F{FUND_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="TRANSFER_AMT">
<subreportParameterExpression><![CDATA[$F{TRANSFER_AMT}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="REPORT_BASE_DIR">
<subreportParameterExpression><![CDATA[$P{REPORT_BASE_DIR}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression class="java.lang.String"><![CDATA[$P{REPORT_BASE_DIR}+"LETTEROFACK_TRANSF_LTR.jasper"]]></subreportExpression>
</subreport>
<subreport isUsingCache="true">
<reportElement
x="11"
y="311"
width="199"
height="104"
key="subreport-3"
isRemoveLineWhenBlank="true"/>
<subreportParameter name="DATE_VALUE">
<subreportParameterExpression><![CDATA[$F{DATE_VALUE}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="PRIM_SALUTATION">
<subreportParameterExpression><![CDATA[$F{AT_PRIM_SALUTATION}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="HF_GREETING">
<subreportParameterExpression><![CDATA[$F{AT_HF_GREETING}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="FIRST_NAME">
<subreportParameterExpression><![CDATA[$F{AT_FIRST_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="MIDDLE_NAME">
<subreportParameterExpression><![CDATA[$F{AT_MIDDLE_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="LAST_NAME">
<subreportParameterExpression><![CDATA[$F{AT_LAST_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="PRIMARY_ORG">
<subreportParameterExpression><![CDATA[$F{AT_PRIMARY_ORG}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="ADDRESS1">
<subreportParameterExpression><![CDATA[$F{AT_ADDRESS1}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="NOMINEE_NAME">
<subreportParameterExpression><![CDATA[$F{AT_NOMINEE_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="TRANSFERRED_FROM">
<subreportParameterExpression><![CDATA[$F{AF_FIRST_NAME}+($F{AF_MIDDLE_NAME} != null ? " "+$F{AF_MIDDLE_NAME}:"")+" "+$F{AF_LAST_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="TRANSFERRED_TO">
<subreportParameterExpression><![CDATA[$F{AT_FIRST_NAME}+($F{AT_MIDDLE_NAME} != null ? " "+$F{AT_MIDDLE_NAME}:"")+" "+$F{AT_LAST_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="FUND_NAME">
<subreportParameterExpression><![CDATA[$F{FUND_NAME}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="TRANSFER_AMT">
<subreportParameterExpression><![CDATA[$F{TRANSFER_AMT}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="REPORT_BASE_DIR">
<subreportParameterExpression><![CDATA[$P{REPORT_BASE_DIR}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression class="java.lang.String"><![CDATA[$P{REPORT_BASE_DIR}+"LETTEROFACK_TRANSF_LTR.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
</jasperReport>

一个子报告是(未显示的)

<jasperReport name="" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="612" pageHeight="792" columnWidth="484" columnSpacing="0" leftMargin="64" rightMargin="64" topMargin="20" bottomMargin="0" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false">
<parameter name="REPORT_BASE_DIR" isForPrompting="true" class="java.lang.String"/>
<parameter name="DATE_VALUE" isForPrompting="true" class="java.lang.String"/>
<parameter name="PRIM_SALUTATION" isForPrompting="true" class="java.lang.String"/>
<parameter name="HF_GREETING" isForPrompting="true" class="java.lang.String"/>
<parameter name="FIRST_NAME" isForPrompting="true" class="java.lang.String"/>
<parameter name="MIDDLE_NAME" isForPrompting="true" class="java.lang.String"/>
<parameter name="LAST_NAME" isForPrompting="true" class="java.lang.String"/>
<parameter name="PRIMARY_ORG" isForPrompting="true" class="java.lang.String"/>
<parameter name="ADDRESS1" isForPrompting="true" class="java.lang.String"/>
<parameter name="ADDRESS2" isForPrompting="true" class="java.lang.String"/>
<parameter name="ADDRESS3" isForPrompting="true" class="java.lang.String"/>
<parameter name="ADDRESS4" isForPrompting="true" class="java.lang.String"/>
<parameter name="CITY" isForPrompting="true" class="java.lang.String"/>
<parameter name="STATE" isForPrompting="true" class="java.lang.String"/>
<parameter name="ZIP_CODE" isForPrompting="true" class="java.lang.String"/>
<parameter name="CITY_STATE_ZIPCODE" isForPrompting="true" class="java.lang.String"/>
<parameter name="NOMINEE_NAME" isForPrompting="true" class="java.lang.String"/>
<parameter name="TRANSFERRED_FROM" isForPrompting="true" class="java.lang.String"/>
<parameter name="TRANSFERRED_TO" isForPrompting="true" class="java.lang.String"/>
<parameter name="FUND_NAME" isForPrompting="true" class="java.lang.String"/>
<parameter name="TRANSFER_AMT" isForPrompting="true" class="java.lang.String"/>

<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<title>
<band height="0" isSplitAllowed="true" >
</band>
</title>
<pageHeader>
<band height="96" isSplitAllowed="true" >
<printWhenExpression><![CDATA[new Boolean($V{PAGE_NUMBER}.intValue()%2==1)]]></printWhenExpression>
</band>
</pageHeader>
<columnHeader>
<band height="0" isSplitAllowed="true" >
</band>
</columnHeader>
<detail>
<band height="630" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" pattern="MMMMM dd, yyyy" isBlankWhenNull="true" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="53"
width="168"
height="14"
forecolor="#000000"
backcolor="#FFFFFF"
key="Date-1"/>
<box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="BentonSans Book" pdfFontName="font.otf" size="10" isBold="false" isPdfEmbedded ="true"/>
</textElement>
<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="83"
width="483"
height="14"
key="Salutation1-1"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[($P{PRIM_SALUTATION} != null ? $P{PRIM_SALUTATION}.concat($P{PRIM_SALUTATION}.lastIndexOf('.') != -1 ? " " : ". ") : "")+$P{FIRST_NAME}+($P{MIDDLE_NAME} != null ? " "+$P{MIDDLE_NAME}:"")+" "+$P{LAST_NAME}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="97"
width="294"
height="14"
key="textField-1"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{PRIMARY_ORG}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="111"
width="294"
height="14"
key="Add1-1"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{ADDRESS1} == null ? "" : $P{ADDRESS1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="125"
width="294"
height="14"
key="Add2-1"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{ADDRESS2} == null ? "" : $P{ADDRESS2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="139"
width="294"
height="14"
key="Add3-1"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{ADDRESS3} == null ? "" : $P{ADDRESS3}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="153"
width="294"
height="14"
key="Add4-1"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{ADDRESS4} == null ? "" : $P{ADDRESS4}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="225"
width="462"
height="14"
key="Greeting-1"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["Dear "+($P{HF_GREETING}.equalsIgnoreCase( "null" )?($P{FIRST_NAME}.equalsIgnoreCase( "null" )?"":$P{FIRST_NAME}):$P{HF_GREETING})+":"]]></textFieldExpression>
</textField>
<staticText>
<reportElement
x="0"
y="424"
width="90"
height="14"
key="staticText-2"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Sincerely,]]></text>
</staticText>

<staticText>
<reportElement
x="0"
y="474"
width="110"
height="14"
key="staticText-4"/>
<box></box>
<textElement verticalAlignment="Middle">
<font .../>
</textElement>
<text><![CDATA[Name]]></text>
</staticText>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="167"
width="294"
height="14"
key="Add4-2"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[($P{CITY} == null ? "" : $P{CITY}+ ", ").concat($P{STATE} == null ? "" : $P{STATE}+" ").concat($P{ZIP_CODE} == null ? "" : $P{ZIP_CODE})]]></textFieldExpression>
</textField>
<staticText>
<reportElement
x="5"
y="181"
width="42"
height="15"
key="staticText-15"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement
x="4"
y="210"
width="42"
height="15"
key="staticText-16"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement
x="4"
y="239"
width="42"
height="10"
key="staticText-17"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement
x="4"
y="409"
width="42"
height="15"
key="staticText-20"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement
x="4"
y="67"
width="42"
height="15"
key="staticText-21"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement
x="0"
y="372"
width="475"
height="50"
key="textField-9"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement verticalAlignment="Top">
<font .../>
</textElement>
<text><![CDATA[text text text]]></text>
</staticText>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="0"
y="196"
width="483"
height="14"
key="Add1-2"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["Account Name: "+$P{NOMINEE_NAME}]]></textFieldExpression>
</textField>
<staticText>
<reportElement
x="0"
y="248"
width="483"
height="14"
key="Add1-3"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[We confirm the following:]]></text>
</staticText>
<staticText>
<reportElement
x="0"
y="261"
width="483"
height="14"
key="Add1-4"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Transferred From :]]></text>
</staticText>
<staticText>
<reportElement
x="0"
y="315"
width="482"
height="14"
key="Add1-5"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Transferred To :]]></text>
</staticText>
<staticText>
<reportElement
x="55"
y="274"
width="89"
height="14"
key="Add1-6"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Registered Holder]]></text>
</staticText>
<staticText>
<reportElement
x="55"
y="287"
width="89"
height="14"
key="Add1-7"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Fund]]></text>
</staticText>
<staticText>
<reportElement
x="55"
y="300"
width="89"
height="14"
key="Add1-8"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Date]]></text>
</staticText>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="148"
y="274"
width="331"
height="12"
key="Add1-9"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{TRANSFERRED_FROM}]]></textFieldExpression>
</textField>
<staticText>
<reportElement
x="148"
y="287"
width="331"
height="14"
key="Add1-10"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Fund , Ltd]]></text>
</staticText>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="148"
y="301"
width="331"
height="14"
key="Add1-11"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{DATE_VALUE}]]></textFieldExpression>
</textField>
<staticText>
<reportElement
x="56"
y="330"
width="89"
height="14"
key="Add1-12"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Registered Holder]]></text>
</staticText>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="149"
y="330"
width="331"
height="12"
key="Add1-13"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{TRANSFERRED_TO}]]></textFieldExpression>
</textField>
<staticText>
<reportElement
x="149"
y="343"
width="331"
height="14"
key="Add1-14"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Fund , Ltd]]></text>
</staticText>
<staticText>
<reportElement
x="56"
y="343"
width="89"
height="14"
key="Add1-15"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Fund]]></text>
</staticText>
<staticText>
<reportElement
x="56"
y="356"
width="89"
height="14"
key="Add1-16"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<text><![CDATA[Date]]></text>
</staticText>
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="149"
y="357"
width="331"
height="14"
key="Add1-17"
positionType="Float"
isRemoveLineWhenBlank="true"/>
<box></box>
<textElement>
<font .../>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{DATE_VALUE}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>

将感谢调试相同的帮助

最佳答案

您正在将主报告的报告连接$P{REPORT_CONNECTION}作为数据源传递给子报告。

这意味着在子报表中我们期望一个查询详细信息带中显示数据(我在子报表中找不到这个查询)。

因为你喜欢: (通过评论发现)

所有数据作为参数传递,你不想在子报表中做任何查询

解决方法是:

在子报表中,不要textField放在detail band中(我们的数据源是0记录,detail band不会被显示),使用另一个带,例如 title 带。

The detail band in jasper report is repeated for every record in the datasource, you have no records so it will not be repeated/displayed.

此外,您需要在子报表 jasperReport 标签上设置属性 whenNoDataType="AllSectionsNoDetail",否则它将是空白的(因为我们没有没有数据,0 条记录,默认为 noPages)。有关其他信息,请参阅 WhenNoDataTypeEnum

其他注意事项:

在报告中指示 pageHeightmargins 时,您还应该更加小心。具有 pageHeight="792" 的子报告可能不适合具有 pageHeight="792"topMargin 的“主”报告="20",因此 792 > 772

编辑:添加了波段定义,因为 OP 对此有一些评论(编辑是从 Understanding-iReport-Elements 复制的):

Title It is the very first band of the report and is printed only once . This area is used to print title of the document and the information that is needed only once in whole iReport.

Page Header This is like a title per page and printed on each page of the report . This is used to setup header information on the page .

Column Header Like page header this band prints on each page,but it prints only if there is a detail band on that page.

Detail This is the most usefull and tricky band of all , This band is repeatedly prints for each row in the data source. In the List of emp_detail report, it is printed for each emp_detail.

Column Footer Is printed on each page if there is a detail band on that page. If the Floating column footer in report Properties is checked, then the column footer will be shown just below the last data of the column, otherwise it will be shown at the bottom of the page (above the page footer).

Page Footer This area is usefull place to insert page numbers. If Last Page Footer is set thab this page prints on each page except the last page,and If Last Page Footer is not set, then it is printed on the last page also.

Last Page Footer This prints at the end of the document , all finishing text and information can be printed in this area.

Summary This is used to conclude the document and it prints only once at the end of the report.

Background This portion is used to set a background image for the document , it is a good place to insert a watermark image for report pages

关于jasper-reports - 未显示 Jasper 子报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33894177/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com