Detail Section left Spaces between Fields. How can I eliminate that?

I am Using latest version of Jasper Reports .I used two frames in detail section of Jasper Reports.One frame is containing all the needed fields in it and is set at top = 0 , second frame is exactly below the first one and contains only one filed.when the text in the text fields of the first frame is normal (fits within the width and do not stretch) the result is normal , means second frame is exactly printed below the first one . but if one of the text field is stretched if content over flows then it leaves some space between the two frames.

I wrote here the XML of my detail section.

<detail> <band height="40" splitType="Stretch"> <frame> <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="430" height="20" isPrintWhenDetailOverflows="true"/> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="129" y="0" width="50" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{netWeight}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="179" y="0" width="50" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{metalRate}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="54" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{productName}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="229" y="0" width="22" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{ratePer}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="251" y="0" width="25" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{ratePerUnit}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="364" y="0" width="66" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{totalAmount}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="104" y="0" width="25" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{piece}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="54" y="0" width="50" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{itemName}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="320" y="0" width="44" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{vatAmount}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="276" y="0" width="44" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{labourAmount}]]></textFieldExpression> </textField> </frame> <frame> <reportElement x="0" y="20" width="430" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"> <printWhenExpression><![CDATA[$F{narration} != null && (!$F{narration}.equals("NONE")) && $F{narration}.length > 0]]></printWhenExpression> </reportElement> <staticText> <reportElement x="0" y="0" width="50" height="20"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <text><![CDATA[Narration]]></text> </staticText> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement x="50" y="0" width="380" height="20" isPrintWhenDetailOverflows="true"/> <box leftPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{narration}]]></textFieldExpression> </textField> </frame> </band> </detail>

-------------Problems Reply------------

I have got solution , so i am posting it here , so anyone if encountered same problem will use this.

Try setting your frames to positionType="Float".

Category:java Views:2 Time:2011-03-16

Related post

  • Can DynamicJasper place the column Title in the detail section? 2011-11-03

    I have been playing with DynamicJasper lately, and have been pretty impressed. The only issue I have is that some of the reports I create are more like printed forms, where you would have the label (which is technically the column header) to the left

  • REPORTS: Detail Section: iif field 1 is null (or blank) write Field 2. 2014-10-05

    Trying to use conditional logic in Control Source for a text box in Report Detail Section. I would like to write (e.g., List) the values of [Last_Name] from qry source IIF the value of [First_Name] is blank/null. I tried a dcount expression but not s

  • Making all fields in a report's Detail section grow in unison 2014-10-10

    I have a single row of fields in the Detail section of a report. All of these fields have their Can Grow property set to Yes. However, if the contents of one field causes it to grow/expand beyond a single line (i.e., vertically), the remaining fields

  • How to set MAXIMUM number of record in DETAIL SECTION in crystal report? 2011-03-30

    How to set MAXIMUM number of record in DETAIL SECTION in crystal report I am making Report which has Pre-Printed Format. Which allows Six Lines of row to be PRINTED. So in report if i get More then Six row in detail Section then it should be set on n

  • Trying to make txtBox not visible in report detail section. Access 2007 2013-03-14

    Good morning All, I am in need of asssistance with getting several text boxes to only be visible if populated with data in a Access 2007 report. This is the code i am currently using, If Me.NQty1 = "" Or IsNull(Me!NQty1) Then Me.NQty1.Visible = False

  • Access Reports: Control Detail section height for preprinted forms 2015-01-08

    I need to be able to set (restrict) the height of the detail section in an Access report, to allow it to grow by only a set number of records so that these records fit into that section on the preprinted form. Additional records in the details sectio

  • Shrink report detail section based on VBA Cose 2015-01-18

    My detail section on report Deliveries has 2 lines the first is always visible but the second I would like to hide if the selected value is N/A (PK=1) Also I want the detail section to now shrink so that there isn't the big space between the lines. T

  • sort detail section of a report based on outcome of calculation 2015-01-26

    My data that the report is based on is sorted by Activity then type - that is what I would assume that the report based off of it would be sorted by - I do not Group by anythin- but it is sorted by Activity - then I have a calcuation =IIf([txtr1] Lik

  • VS 2003 CrystalReports - details section problem 2008-09-22

    I have 2 details section on my report (Datails a and Details b). Fields i both sections can grow up to 10 lines. How to force CrystalReport that both section must be printed on one page. Currently CrystalReport on bottom page print section "Details a

  • Crystal Reports text cuts off last line in Details section 2009-05-15

    I have a Crystal Report 11 file that is a letter. The first Details section contains a large text box that has print date, address block, and the salutation line. Every once in a while, the last line of the text box gets cut off so that the salutatio

  • Printing Crystal Report detail section to second page collated 2009-06-16

    I have a Crystal XI Release 2 report that my client wants to see on two pages. He wants the report to print the demographic information such as (name, address, etc...) for a person on the first page and the totals for the person need to print on the

  • Conditional Suppressing Detail section in Crystal Report 2009-09-04

    There are 2 subreports in detail section of my report. I have enabled suppress blank for subreports. Now i want to suppress detail section if both subreports have no data i.e. both are suppressed. I searched a lot on web but did not find a solution.

  • MS Access Draw line around detail section that can grow 2010-04-09

    This really shouldn't be hard, I just can't figure out how to do it. I am making a proposal report that needs to have a border around it. The problem is to get the vertical lines on the side. I can't figure out how to get a line to grow and shrink ba

  • Cannot bind to list.property or list.item.property in details section of Telerik report 2010-06-18

    I have created a Telerik report and I am setting the datasource on runtime to an object with some properties and a List. I am using the properties in the page and report header sections and i want to use the list as the details. Now the problem is bi

  • show only in the first row in crystal reports details section 2010-11-04

    i have a crystal report and there is a field in details section which currently showing for each row. what's the way to set this field to show only once on the very first row? --------------Solutions------------- Right-click on the field in Report De

  • C# Microsoft.Reporting.Winforms RDLC - how to add detail sections in body? 2011-01-05

    I am rendering a Winforms.LocalReport and would like to know if it is possible, and how to add Detail/Sections to the body of the report like in MS Access Report and Crystal Reports. Organising into details will help manage page breaks and also gener

  • How to use one column in two detail sections with Crystal Reports 2011-04-12

    I need to show one column which is from backend in two detail sections based on the condition that in one detail section this column value should be the second columns(particular) corresponding value and in other detail section except that particular

  • Paragraph breakage, one page to the other page, in detail section of Crystal Reports 2011-12-15

    I have made a report in Crystal Reports, it has a detail section, i have dragged a variable carrying text and if the paragraph of the text longer, i want its half of the part should be gone to the next page, as we see in text books and as it is a sta

  • Duplicate data of sub report at Details section in main Report 2011-12-26

    Please help me ! I have a problem in Crystal Report at visual studio:: I have 2 sub reports within the main report , and I put them at main Details section , when i run the report , the sub reports duplicated many times .. thanks for solution . -----

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.217 (s). 11 q(s)