Jump to content

PageHeader Problem


sabernethy

Recommended Posts

Greetings All-

 

I am creating a report template and I'm having problems with the pageHeader. I want to display the title of the report at the top of every page in a text field. I pass in the title of the report as a parameter, $V{REPORT_TITLE} .

 

If I set the evaluation time for the text field at "Now", the title displays correctly but only on the first page. For the rest of the report, the title does not display at all.

 

If I set the evaluation time for the text field to "Band", the report title displays but the title does not stretch if the title is long.

 

Any suggestions would be greatly appreciated.

 

This is the code from my page header in a sample report:

Code:
		<pageHeader>
<band height="22" isSplitAllowed="true" >
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
mode="Transparent"
x="2"
y="1"
width="534"
height="18"
forecolor="#111111"
backcolor="#FFFFFF"
key="textField-1"
stretchType="RelativeToBandHeight"
isPrintRepeatedValues="false"
isPrintWhenDetailOverflows="true"/>
<box topBorder="None" topBorderColor="#111111" leftBorder="None" leftBorderColor="#111111" rightBorder="None" rightBorderColor="#111111" bottomBorder="None" bottomBorderColor="#111111"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" lineSpacing="Single">
<font fontName="Times New Roman" pdfFontName="Times-Roman" size="14" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{REPORT_TITLE}]]></textFieldExpression>
</textField>
<line direction="TopDown">
<reportElement
x="1"
y="21"
width="550"
height="0"
key="line-1"
positionType="Float"/>
<graphicElement stretchType="NoStretch"/>
</line>
</band>
</pageHeader>
Link to comment
Share on other sites

  • Replies 2
  • 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...