geannib Posted September 23, 2018 Share Posted September 23, 2018 HiI want to have a shape inside the detail section. The height of the shape I want to be the same height as the detail.The details section is dynamak and I don't know from the beginning which size to set. I want to anchor somehow the top and bottom of the shape(rectangle for example) on the top and bottom of the detail.Is it possible? Link to comment Share on other sites More sharing options...
riodavid Posted September 26, 2018 Share Posted September 26, 2018 Rectangle -> Appearance -> Size -> Stretch Type -> Relative To Band Height Link to comment Share on other sites More sharing options...
geannib Posted September 29, 2018 Author Share Posted September 29, 2018 This is a sample. I tried both ContainerHeight and RelativeToBandHeight. I'm using jasper studio 6.6.0. In the preview I see the rectacle with its original size.<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 --><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="shape" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="8a872d2a-ad58-4353-a920-4da129ef0c07"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="DataAdapter.xml"/> <queryString> <![CDATA[]]> </queryString> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"/> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="61" splitType="Stretch"/> </columnHeader> <detail> <band height="130" splitType="Stretch"> <rectangle> <reportElement positionType="Float" stretchType="ContainerHeight" x="329" y="65" width="100" height="50" uuid="c170cee6-c44e-4060-9220-088b4c615cd4"/> </rectangle> <staticText> <reportElement x="23" y="19" width="100" height="30" uuid="7bdc1794-c000-4654-80ee-383af8e08a38"/> <text><![CDATA[begin]]></text> </staticText> <staticText> <reportElement x="30" y="85" width="100" height="30" uuid="4538d6c5-c842-4af2-80e6-a98b77827ea1"/> <text><![CDATA[end]]></text> </staticText> </band> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport>[/code] Link to comment Share on other sites More sharing options...
Solution riodavid Posted September 30, 2018 Solution Share Posted September 30, 2018 " I want to be the same height as the detail. "So first you have to set your shape height the same as the detail height. Link to comment Share on other sites More sharing options...
geannib Posted September 30, 2018 Author Share Posted September 30, 2018 Yes that was the problem with the height.Another thing: in case the detail is spred over multiple pages, the shape is limited only to the first page. Setting "detail overflow" does not solve the problem.How can I make it taking the size of the detail on many pages?Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now