Jump to content
Changes to the Jaspersoft community edition download ×

A rectangle around subreport brings in extra whitespace at the bottom of the detail band


yange1025

Recommended Posts

I want to surround a subreport with a rounded rectangle, the jrxml source of detail band is shown below:

<detail>

<band height="6" splitType="Stretch">

<property name="com.jaspersoft.studio.unit.height" value="pixel"/>

<rectangle radius="10">

<reportElement key="" stretchType="RelativeToTallestObject" x="0" y="0" width="565" height="5" isPrintWhenDetailOverflows="true" uuid="313268d9-3fb3-444c-922b-47c967b643e0">

<property name="com.jaspersoft.studio.unit.x" value="pixel"/>

<property name="com.jaspersoft.studio.unit.y" value="pixel"/>

<property name="com.jaspersoft.studio.unit.height" value="pixel"/>

</reportElement>

<graphicElement fill="Solid">

<pen lineWidth="1.0" lineStyle="Solid" lineColor="#652D86"/>

</graphicElement>

</rectangle>

<subreport>

<reportElement mode="Transparent" x="0" y="0" width="554" height="5" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="37df43d6-fb57-4ff1-97cb-6389f9bda634">

<property name="com.jaspersoft.studio.unit.y" value="pixel"/>

<property name="com.jaspersoft.studio.unit.height" value="pixel"/>

<property name="com.jaspersoft.studio.unit.width" value="pixel"/>

</reportElement>

<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>

<subreportParameter name="ORI_ACCT_ID">

<subreportParameterExpression><![CDATA[$F{ORI_ACCT_ID}]]></subreportParameterExpression>

</subreportParameter>

<subreportExpression><![CDATA["/Sub-Template/dms_company/mul_charge_company_detail.jasper"]]></subreportExpression>

</subreport>

</band>

</detail>

and here is the design:

snipaste_2019-06-17_16-02-53.png.86cfbe673720aa69ddc4780b8e7f7700.png

The problem is , there's always extra withespace at the bottom of detail band when it overflows into next page, as you can see here:

snipaste_2019-06-17_15-52-57.png.669a64a12f21f67efc8d6854b3e3a53f.png

How can I remove the whitespace?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Have you already tried to remove the deprecated StretchingType "RelativeToTallestObject" and replace it with the "newer" ones "ContainerHeight" or perhaps to build an element group for rectangle and subreport and use the stretching type "ElementGroupHeight"  instead?

In former JasperReports version I always used lines to create surrounding rectangles because of this "strange" behaviour" when pages break. But unfortunately this won't work with "nicer" looking rounded rectangles.

 

htt + regards

C-Box

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