Jump to content
We've recently updated our Privacy Statement, available here ×

SubReport's Detail band doesn't Stretch


2005 IR Help

Recommended Posts

By: Juha - juharossi

SubReport's Detail band doesn't Stretch

2005-11-17 06:48

Hi,

 

(Using Ireport 0.5.2)

I two textfields in subreport. First one in title band and the other in detail band. I have not added extra space at end of detail band. When passing multiline Strings into both bands, it seems that only the title band is stretching vertically. Problem only in PDF/RTF! Is this a bug? Below is the xml of the sub report.

Thanks in advance

-J

 

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

<!-- Created with iReport - A designer for JasperReports -->

<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">

<jasperReport

name="lta_taulu_a4"

columnCount="1"

printOrder="Horizontal"

orientation="Portrait"

pageWidth="595"

pageHeight="842"

columnWidth="565"

columnSpacing="0"

leftMargin="0"

rightMargin="0"

topMargin="0"

bottomMargin="0"

whenNoDataType="NoPages"

isTitleNewPage="false"

isSummaryNewPage="false">

<property name="ireport.scriptlethandling" value="0" />

<property name="ireport.encoding" value="UTF-8" />

<import value="java.util.*" />

<import value="net.sf.jasperreports.engine.*" />

<import value="net.sf.jasperreports.engine.data.*" />

<parameter name="LAKI" isForPrompting="false" class="java.lang.String">

<defaultValueExpression ><![CDATA["ZOR"]]></defaultValueExpression>

</parameter>

<parameter name="F1" isForPrompting="false" class="java.lang.String">

<defaultValueExpression ><![CDATA["F1"]]></defaultValueExpression>

</parameter>

<parameter name="OTSIKKO" isForPrompting="false" class="java.lang.String">

<defaultValueExpression ><![CDATA["OTSIKKO"]]></defaultValueExpression>

</parameter>

<parameter name="V0" isForPrompting="false" class="java.lang.String"/>

<parameter name="V1" isForPrompting="false" class="java.lang.String"/>

<parameter name="V2" isForPrompting="false" class="java.lang.String"/>

<parameter name="V3" isForPrompting="false" class="java.lang.String"/>

<parameter name="V4" isForPrompting="false" class="java.lang.String"/>

<parameter name="V5" isForPrompting="false" class="java.lang.String"/>

<parameter name="KYSYMYS" isForPrompting="false" class="java.lang.String">

<parameterDescription><![CDATA[KYSYMYS]]></parameterDescription>

</parameter>

<field name="V0" class="java.lang.Boolean">

<fieldDescription><![CDATA[V0]]></fieldDescription>

</field>

<field name="V1" class="java.lang.Boolean">

<fieldDescription><![CDATA[V1]]></fieldDescription>

</field>

<field name="V2" class="java.lang.Boolean">

<fieldDescription><![CDATA[V2]]></fieldDescription>

</field>

<field name="V3" class="java.lang.Boolean">

<fieldDescription><![CDATA[V3]]></fieldDescription>

</field>

<field name="V4" class="java.lang.Boolean">

<fieldDescription><![CDATA[V4]]></fieldDescription>

</field>

<field name="V5" class="java.lang.Boolean">

<fieldDescription><![CDATA[V5]]></fieldDescription>

</field>

<field name="KYSYMYS" class="java.lang.String">

<fieldDescription><![CDATA[KYSYMYS]]></fieldDescription>

</field>

<variable name="ROW_COUNT" class="java.lang.Integer" resetType="Report" incrementType="Report" calculation="Count">

<variableExpression><![CDATA[$F{KYSYMYS}]]></variableExpression>

</variable>

<variable name="ISPAR" class="java.lang.Integer" resetType="Report" calculation="Nothing">

<variableExpression><![CDATA[new Integer( $V{ROW_COUNT}.intValue() % 2 )]]></variableExpression>

</variable>

<background>

<band height="15" isSplitAllowed="true" >

</band>

</background>

<title>

<band height="29" isSplitAllowed="true" >

<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

mode="Opaque"

x="0"

y="1"

width="166"

height="28"

forecolor="#FF0033"

backcolor="#999999"

key="textField-8"

stretchType="RelativeToTallestObject"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="true"/>

<box topBorder="Thin" topBorderColor="#FFFFFF" leftBorder="None" leftBorderColor="#CCCCCC" rightBorder="Thin" rightBorderColor="#FFFFFF" bottomBorder="Thin" bottomBorderColor="#FFFFFF"/>

<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single">

<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{OTSIKKO}]]></textFieldExpression>

</textField>

</band>

</title>

<pageHeader>

<band height="0" isSplitAllowed="true" >

</band>

</pageHeader>

<columnHeader>

<band height="0" isSplitAllowed="true" >

</band>

</columnHeader>

<detail>

<band height="20" isSplitAllowed="true" >

<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

mode="Opaque"

x="0"

y="0"

width="166"

height="20"

forecolor="#000000"

backcolor="#CCCCCC"

key="textField-15"

stretchType="RelativeToTallestObject"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="true"/>

<box topBorder="Thin" topBorderColor="#FFFFFF" leftBorder="None" leftBorderColor="#CCCCCC" rightBorder="Thin" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#FFFFFF"/>

<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single">

<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{KYSYMYS}]]></textFieldExpression>

</textField>

</band>

</detail>

<columnFooter>

<band height="0" isSplitAllowed="true" >

</band>

</columnFooter>

<pageFooter>

<band height="0" isSplitAllowed="true" >

</band>

</pageFooter>

<summary>

<band height="0" isSplitAllowed="true" >

</band>

</summary>

</jasperReport>

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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