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

grid layout and components with padding


tommy2381

Recommended Posts

Hello all,

i am using jaspersoft studio 6.3.0 final in eclipse and i am having a problem with grid layout and components with padding.

i have this valid report design from below. If i change for the textfield "Kontrollort" the column weight to 2.0 the design becomes invalid.

ERROR: "Element reaches outside frame width: x=0, width=277, available width=257. --..."

Additional,  if i have the same design, but without the "padding" on "Frame" element the design will remain valid if i do the same modification as above.

Am i doing something wrong here ? Thank you.

 

<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="Quittungbericht_A4" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" resourceBundle="com/scweb/bag/textprocessing/pdfgeneration/business/report/messages/messages" uuid="13acf49e-4913-4d1b-bccc-113817ad15d1">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<style name="Title" forecolor="#FFFFFF" fontName="Arial" fontSize="50" isBold="false"/>
<style name="SubTitle" forecolor="#CCCCCC" fontName="Arial" fontSize="18" isBold="false"/>
<style name="Column header" forecolor="#666666" fontName="Arial" fontSize="14" isBold="true"/>
<style name="Detail" mode="Transparent" fontName="Arial"/>
<style name="Row" mode="Transparent" fontName="Arial" pdfFontName="Arial">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
<style mode="Opaque" backcolor="#F0EFEF"/>
</conditionalStyle>
</style>
<queryString>
<![CDATA[]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="100" splitType="Immediate">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.grid.JSSGridBagLayout"/>
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<textField isStretchWithOverflow="true">
<reportElement positionType="Float" x="0" y="0" width="185" height="100" uuid="b61b6550-bdc9-4385-8808-bf0a28aafadc">
<property name="com.jaspersoft.layout.grid.x" value="1"/>
<property name="com.jaspersoft.layout.grid.y" value="-1"/>
<property name="com.jaspersoft.layout.grid.weight.x" value="1.0"/>
<property name="com.jaspersoft.layout.grid.weight.y" value="1.0"/>
<property name="com.jaspersoft.layout.grid.rowspan" value="1"/>
<property name="com.jaspersoft.layout.grid.colspan" value="1"/>
<property name="com.jaspersoft.layout.grid.weight.fixed" value="false"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="Left"/>
<textFieldExpression><![CDATA["Kontrollort"]]></textFieldExpression>
</textField>
<frame>
<reportElement positionType="Float" x="185" y="0" width="370" height="100" uuid="1569caa1-0611-4098-9a10-b763183b2c6a">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.grid.JSSGridBagLayout"/>
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<property name="com.jaspersoft.layout.grid.x" value="2"/>
<property name="com.jaspersoft.layout.grid.y" value="-1"/>
<property name="com.jaspersoft.layout.grid.weight.x" value="2.0"/>
<property name="com.jaspersoft.layout.grid.weight.y" value="1.0"/>
<property name="com.jaspersoft.layout.grid.rowspan" value="1"/>
<property name="com.jaspersoft.layout.grid.colspan" value="1"/>
<property name="com.jaspersoft.layout.grid.weight.fixed" value="false"/>
</reportElement>
<box topPadding="10" leftPadding="10" bottomPadding="10" rightPadding="10">
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="0" width="350" height="80" uuid="db5093d2-ba8b-4fb6-b0cd-7f71425cbb97">
<property name="com.jaspersoft.layout.grid.x" value="1"/>
<property name="com.jaspersoft.layout.grid.y" value="-1"/>
<property name="com.jaspersoft.layout.grid.weight.x" value="1.0"/>
<property name="com.jaspersoft.layout.grid.weight.y" value="1.0"/>
<property name="com.jaspersoft.layout.grid.rowspan" value="1"/>
<property name="com.jaspersoft.layout.grid.colspan" value="1"/>
<property name="com.jaspersoft.layout.grid.weight.fixed" value="false"/>
</reportElement>
<box padding="10">
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA["Richtung Tholey"]]></textFieldExpression>
</textField>
</frame>
</band>
</detail>
</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

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