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

isStretchWithOverflow not working in subreport


jhertz

Recommended Posts

Hi,

I have a report that two sub-reports in it. It gets rendered to a PDF, the problem is that the text fields that are tagged as isStretchWithOverflow does not stretch. I have tried to run just the sub-report and then it works fine.  So how do I get it to behave the same when part of the master report?

Regards

jhertz

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...

Hi,

Sorry for the late reply, the sub report is in the detail band. Do you want a sample as in a rendered report or as in the XML? I have added the detail bands XML in the code section.

Thanks

 

 

Code:
	<detail>		<band height="28" splitType="Stretch">			<staticText>				<reportElement style="Headin01" x="0" y="0" width="100" height="15"/>				<textElement/>				<text><![CDATA[breaks:]]></text>			</staticText>			<line>				<reportElement x="0" y="15" width="515" height="1"/>			</line>			<staticText>				<reportElement style="Headin04" x="0" y="16" width="100" height="12">					<printWhenExpression><![CDATA[new Boolean($P{printBreaks}.booleanValue() == false)]]></printWhenExpression>				</reportElement>				<textElement/>				<text><![CDATA[no current breaks]]></text>			</staticText>		</band>		<band height="60" splitType="Stretch">			<subreport>				<reportElement positionType="Float" x="0" y="0" width="515" height="60" isRemoveLineWhenBlank="true">					<printWhenExpression><![CDATA[$P{printBreaks}]]></printWhenExpression>				</reportElement>				<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>				<dataSourceExpression><![CDATA[$P{breaks}]]></dataSourceExpression>				<subreportExpression class="java.lang.String"><![CDATA[$P{reportFolder} + "/PositionLimits_BW.jasper"]]></subreportExpression>			</subreport>		</band>		<band height="70" splitType="Stretch">			<staticText>				<reportElement style="Headin01" x="0" y="42" width="100" height="15"/>				<textElement/>				<text><![CDATA[Warnings:]]></text>			</staticText>			<line>				<reportElement x="0" y="57" width="515" height="1"/>			</line>			<staticText>				<reportElement style="Headin04" x="0" y="58" width="100" height="12">					<printWhenExpression><![CDATA[new Boolean($P{printWarnings}.booleanValue() == false)]]></printWhenExpression>				</reportElement>				<textElement/>				<text><![CDATA[no current warnings]]></text>			</staticText>		</band>		<band height="60" splitType="Stretch">			<subreport>				<reportElement positionType="Float" x="0" y="0" width="515" height="60" isRemoveLineWhenBlank="true">					<printWhenExpression><![CDATA[$P{printWarnings}]]></printWhenExpression>				</reportElement>				<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>				<dataSourceExpression><![CDATA[$P{warnings}]]></dataSourceExpression>				<subreportExpression class="java.lang.String"><![CDATA[$P{reportFolder} + "/PositionLimits_BW.jasper"]]></subreportExpression>			</subreport>		</band>		<band height="140" splitType="Stretch">			<subreport>				<reportElement positionType="Float" x="0" y="0" width="515" height="140"/>				<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>				<dataSourceExpression><![CDATA[$P{all}]]></dataSourceExpression>				<subreportExpression class="java.lang.String"><![CDATA[$P{reportFolder} + "/PositionLimits_All.jasper"]]></subreportExpression>			</subreport>		</band>	</detail>
Link to comment
Share on other sites

Does the master report have printOrder=Horizontal?

Ideally a sample would be self-contained test case (JRXMLs + data) that reproduces the problem.  Full JRXMLs suffice in many cases though.  Of course reducing the reports to the simplest case in which the problem occurs helps.

Regards,

Lucian

Link to comment
Share on other sites

  • 2 weeks later...

Hi,


 


I revisited the issue, and without me changing anything it wraps to another row now. To be honest I really don’t know what I have changed. I updated my version of ireport and maybe it did set some attribute that I had previously over looked.


 


Sorry for wasting your time, and once again thanks for the help.


 


Regards


jhertz

Link to comment
Share on other sites

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