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

fanethemighty

Members
  • Posts

    2
  • Joined

  • Last visited

fanethemighty's Achievements

Newbie

Newbie (1/14)

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

Recent Badges

0

Reputation

  1. Thank you for the answer, makes things clear. I guess a crosstab is more suited in this case.
  2. Hi! I'm trying to create a simple grouping of rows like on the following image: That is I have a simple bean with fields "group" and "detail"; grouping is done by the "group" field values. In the detail band, I would liked rows grouped by the "group" field and the group valued aligned with middle vertical alignment. For this I have created a simple report using iReport like in the next picture (everything is in the detail band) I have investigated several possibilities for defining the first textfield, but none of them successful. Here are some options for the textfiled containing $F{Group} and their respective outputs. A. Print Repeated values=false, Position Type=Fix Relative to Bottom, Stretch Type=Relative to Band Height, Evaluation Time=Band (from docs: BAND The element will be evaluated at band end.BAND) Result can be seen in the next picture. B. Print Repeated values=true, Position Type=Fix Relative to Bottom, Stretch Type=Relative to Band Height, Evaluation Time=Band Result: the same as previous C. Print Repeated values=true, Position Type=Fix Relative to Bottom, Stretch Type=Relative to Band Height, Evaluation Time=Band, Print When Group Changes=group Result: the same as previous D. Print Repeated values=false, Position Type=Fix Relative to Bottom, Stretch Type=Relative to Band Height, Evaluation Time=Now, Print When Group Changes=group Result: the same as previous E. Print Repeated values=false, Position Type=Fix Relative to Bottom, Stretch Type=Relative to Band Height, Evaluation Time=Group, Evaluation Group=group, Print When Group Changes=null Result: the same as previous F. Print Repeated values=false, Position Type=Fix Relative to Bottom, Stretch Type=Relative to Band Height, Evaluation Time=Group, Evaluation Group=group, Print When Group Changes=group Result: the same as previous So, as you see, no real luck. Here is the attached source for the report. <?xml version="1.0" encoding="UTF-8"?><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="TestBandHeight" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <queryString> <![CDATA[]]> </queryString> <field name="Group" class="java.lang.String"/> <field name="Detail" class="java.lang.String"/> <group name="group"> <groupExpression><![CDATA[$F{Group}]]></groupExpression> </group> <detail> <band height="28" splitType="Stretch"> <textField isStretchWithOverflow="true" evaluationTime="Group" evaluationGroup="group"> <reportElement positionType="FixRelativeToBottom" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" mode="Opaque" x="114" y="0" width="100" height="28" printWhenGroupChanges="group" backcolor="#FFCC00"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{Group}]]></textFieldExpression> </textField> <textField> <reportElement mode="Opaque" x="214" y="0" width="100" height="28" backcolor="#00CCCC"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{Detail}]]></textFieldExpression> </textField> </band> </detail></jasperReport>[/code] Here is the same question, unfortunately with no response: http://community.jaspersoft.com/questions/540767/stretching-non-overflowing-text-field-detail-band Thank you.
×
×
  • Create New...