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

eric_26

Members
  • Posts

    1
  • Joined

  • Last visited

eric_26's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hello, I am relatively new to Jasper Reprots and the world of jrmlx, but have had some success creating a dynamic report and subreport ... thanks to all on this community. However, I am stuck and spinning my wheels trying to get the layout working between my main report and subreport. I am using JasperSoft Studio. Problem is that I have a series of fields in my main report that I need to be able to word wrap. The report's Detail block contains a frame and a subreport. The frame then contains the report fields. From the image below, you can see the main frame (outlined in Green) is expanding correctly with the tallest items and the field text is wrapping. However, when my subreport is called, it is not repositioning to the bottom of the stretched frame. Instead, it is overlapping. I've tried a number of combinations, including putting frames around the subreport but I have not found the magic combination that aligns the subreport to the bottom of the stretched frame. Can anyone help me understand the layout and provide any suggestions? Detail section of the main .jrxml <detail> <band height="34" splitType="Stretch"> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/> <frame> <reportElement style="Row" positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="988" height="17" uuid="efd5b0e3-15d2-4d49-bdb8-80229691b2f5"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#2AFF00"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#2AFF00"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#2AFF00"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#2AFF00"/> </box> <textField> <reportElement x="12" y="0" width="42" height="13" uuid="a7e32666-47f7-4606-bf9a-f8ccd97d12bf"/> <textFieldExpression><![CDATA[$F{FormattedID}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement stretchType="RelativeToTallestObject" x="59" y="0" width="152" height="13" uuid="c65d432d-1134-411e-8cea-0c8fb071a3f2"/> <textFieldExpression><![CDATA[$F{Name}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement stretchType="RelativeToTallestObject" x="379" y="0" width="76" height="13" uuid="42e27001-6a2a-409d-981a-033b4799f735"/> <textFieldExpression><![CDATA[$F{c_ExecutionOwner}]]></textFieldExpression> </textField> <textField> <reportElement x="216" y="0" width="76" height="13" uuid="976e6ac0-957c-44fe-8945-56c3a65af295"/> <textFieldExpression><![CDATA[$F{State}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement stretchType="RelativeToTallestObject" x="297" y="0" width="76" height="13" uuid="fc8af430-d75b-4f5b-ab60-6d088e74a265"/> <textFieldExpression><![CDATA[$F{Owner}]]></textFieldExpression> </textField> <textField> <reportElement key="" style="StatusColor" mode="Transparent" x="460" y="0" width="110" height="13" forecolor="#000000" backcolor="#FFFFFF" uuid="8546bd9c-8cec-474f-801e-c6e970ce91c0"/> <textFieldExpression><![CDATA[$F{DisplayColor}.toUpperCase()]]></textFieldExpression> </textField> <staticText> <reportElement style="StatusColor" mode="Opaque" x="0" y="0" width="8" height="13" uuid="997a425c-3c26-4664-b611-afc3d08353c0"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <text><![CDATA[]]></text> </staticText> </frame> <subreport> <reportElement style="Default" positionType="Float" x="20" y="15" width="968" height="17" uuid="a5a4a054-4b4a-4e90-b55d-4b38228d197c"/> <subreportParameter name="fID"> <subreportParameterExpression><![CDATA[$F{FormattedID}]]></subreportParameterExpression> </subreportParameter> <dataSourceExpression><![CDATA[$P{REPORT_SCRIPTLET}.getDynamicSubreportDataSource()]]></dataSourceExpression> <subreportExpression><![CDATA[$P{REPORT_SCRIPTLET}.getDynamicSubreport()]]></subreportExpression> </subreport> </band></detail>[/code]Subreport.jrxml <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.1.1.final using JasperReports Library version 6.1.1 --><!-- 2015-09-21T11:41:59 --><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="subreport" pageWidth="575" pageHeight="100" whenNoDataType="AllSectionsNoDetail" columnWidth="575" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="ec68a623-8c6d-4f83-b1c5-0b5f56fa4013"><style name="Default" isDefault="true" markup="none" isBlankWhenNull="true" fontSize="8"/><style name="Copyright" fontSize="6"/><style name="Column header" forecolor="#666666" fontName="Times New Roman" fontSize="14" isBold="true"/><style name="SubreportRow" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman"> <conditionalStyle> <conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression> <style mode="Opaque" backcolor="#D1F2FF"/> </conditionalStyle></style><parameter name="fID" class="java.lang.String" isForPrompting="false"> <parameterDescription><![CDATA[]]></parameterDescription></parameter><parameter name="MyClass" class="com.blah.myclass" isForPrompting="false"/><field name="FormattedID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription></field><field name="Name" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription></field><field name="c_ExecutionOwner" class="java.lang.String"/><detail> <band height="15" splitType="Immediate"> <frame> <reportElement style="SubreportRow" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="571" height="13" uuid="222661a0-575a-4be2-8350-45deb57cbad0"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#1C33FF"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#1C33FF"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#1C33FF"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#1C33FF"/> </box> <textField> <reportElement x="9" y="0" width="33" height="13" uuid="fdf9fa95-e149-44fd-af66-8dffe10f7bf1"/> <textFieldExpression><![CDATA[$F{FormattedID}]]></textFieldExpression> </textField> <textField> <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="47" y="0" width="98" height="13" uuid="47c98445-5960-4aae-8cc3-681f0fc9efea"/> <textFieldExpression><![CDATA[$F{Name}]]></textFieldExpression> </textField> <textField> <reportElement x="150" y="0" width="76" height="13" uuid="c8d896bc-8d57-44d2-bd81-ae6442dac5bb"/> <textFieldExpression><![CDATA[$F{c_ExecutionOwner}]]></textFieldExpression> </textField> </frame> </band></detail></jasperReport>[/code]
×
×
  • Create New...