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

tonyxl

Members
  • Posts

    5
  • Joined

  • Last visited

tonyxl'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. I came up with a quick and dirty workaround. We have manual line breaks in the left side "label" field (we wanted consistent and predictive breaking). So in the right side "value" field, I call a utility method that counts up the line breaks in the label and prepends them to the value.
  2. I have 2 adjacent text fields (see code). Both contain dynamic text that could span multiple lines. I would like the right-hand field to start at the same place as the last line of the left hand field. See the attached JPG for the desired result. Is this possible in Jasper? Thanks, Tony Code:<?xml version="1.0" encoding="UTF-8" ?><!-- Created with iReport - A designer for JasperReports --><!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"><jasperReport name="Stretch" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="612" pageHeight="792" columnWidth="552" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <detail> <band height="12" isSplitAllowed="true" > <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="271" y="0" width="231" height="11" key="textField-2" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["I want this line to align with label colonnline 2nline3"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="29" y="0" width="231" height="11" key="textField-3" positionType="Float"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Right"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Dynamic Labelnspanningn3 lines:"]]></textFieldExpression> </textField> </band> </detail></jasperReport>
  3. Teodor Danciu Wrote: ... We are now willing to enhance the engine so that we allow the subreport to strech and occupy the whole space down to the bottom of the page inside the master. This behavior will be controlled by a subreport property. But before starting to work on this, are you sure this is what needs to happen? I mea, are you sure that you always want your subreport to consume the space so that its page footer reaches the bottom of the page in the master? ... Thanks for responding. The behavior you mention above is exactly what we would like to see happen. This would be a much appreciated enhancement. Is there any workaround we could use for the present? Probably not, and I can understand why the current Jasper behavior was implemented this way. Thanks, Tony
  4. I am having the exact same problem. The problem occurs no matter which output type I generate (PDF, HTML, RTF). The sample posted by the original poster shows that even a simple report/subreport combo produces this problem. Is this a known JasperReports bug? Thanks, Tony
×
×
  • Create New...