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

dydyredt

Members
  • Posts

    3
  • Joined

  • Last visited

dydyredt'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'm using ireport 3.5.3. I have a detail band with one static text field and a single large dynamic text field underneath it. I want the detail band to split so that the text field will split across two pages if it is long. I set the split type on the band to "Immediate". This works fine if the text is very short or very long. If it is very short, it stays on the first page, and if it is very long, it is split across the two pages. However, it seems that if the text is somewhat long so that the end of the text falls around where the text box would have been split, the text box is actually repeated on page 1 and page 2. So the same text appears inside the box on page 1 and 2. Has anyone come across this before? I'm not sure if it matters, but the position of the text box is "float", and the stretch type on the box is "None". The box has the "Stretch with Overflow" checked. I'm including the code of the band. Code: <band height="164" splitType="Immediate"> <staticText> <reportElement positionType="Float" mode="Transparent" x="6" y="0" width="482" height="16" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" backcolor="#FFFFFF"/> <textElement verticalAlignment="Bottom"> <font fontName="Arial" size="9" isBold="true" isUnderline="true"/> </textElement> <text><![CDATA[OVERALL CONCLUSIONS/REASON(S) FOR DISPOSITION: ]]></text> </staticText> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="6" y="24" width="558" height="130" isPrintWhenDetailOverflows="true"/> <box topPadding="8" leftPadding="8" bottomPadding="8" rightPadding="8"> <pen lineWidth="1.5" lineColor="#666666"/> <topPen lineWidth="1.5" lineColor="#666666"/> <leftPen lineWidth="1.5" lineColor="#666666"/> <bottomPen lineWidth="1.5" lineColor="#666666"/> <rightPen lineWidth="1.5" lineColor="#666666"/> </box> <textElement markup="html"> <font fontName="Arial" size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{writeupComments}]]></textFieldExpression> </textField> </band>
  2. I am not sure if this will work... say if text box 3 has very long text in it and it has to stretch, how would the bottom of text box 2 stay aligned, since there is no stretch type set for text box 1 or 2? Also, since all three text boxes can have text of variable length, why is "Print when detail overflows" and "Stretch With Overflow" not ticked for all three text boxes? In case it was not clear what exactly I was trying to do, I'm adding another attachment with some examples of how I want the boxes to stretch - can you please take a look? There are three examples in the document - I am able handle example 1 and 2 correctly by setting stretch type for box 3 to Relative to Band Height. But I am stumped on how to handle example 3. In any case i will try it but I need to clarify one thing - when you said for text box 2 that "Print when expression" shoudl be ticked, I'm assuming you meant "Print when detail overflows". Print when expression is not a checkbox that you can tick. Post Edited by dydyredt at 02/02/2011 15:22 Post Edited by dydyredt at 02/02/2011 15:24
  3. I am using ireport 3.5.3. I have three text boxes in a single detail band. The arrangement of the three text boxes is shown in the attached word file. Basically text box 2 is directly underneath text box 1, and text box 3 is next to them. All three text boxes can have text of variable length, so I have set "Stretch with Overflow" to true for all three text boxes. I want to set up the text boxes so that the top of text box 1 and the top of text box 3 are always aligned, and the bottom of text box 2 and the bottom of text box 3 are always aligned, and text box 2 is always directly underneath text box 1. Any idea of how to do it? In HTML this would be pretty easy to do by setting the "rowspan" property of text box 3 to 2. I believe "tables" have been introduced in later versions of ireport, but not in the version I'm currently using, so that is not an option. I have tried setting the stretch type of all three text boxes to "Relative to band height". This makes text box 3 stretch properly when 1 or 2 stretches, but if text box 3 stretches so that it is taller than 1 and 2 put together, I want text box 2 to stretch down, and I can't get this to happen. Is there any way to do this, maybe using frames or grouping? I am not sure I understand the stretch type property that well. Post Edited by dydredt at 02/01/2011 14:46 Post Edited by dydredt at 02/01/2011 17:12 Post Edited by dydredt at 02/01/2011 17:14
×
×
  • Create New...