Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

Frame leaves empty space when not displayed in PDF report

Course Queries Syllabus Queries

Max. 2000 characters
Replies

usr_profile.png

User

( 4 months ago )


I am using iReport 4.5.1 to design the JR pdf report. I am using frame component to group few fields in the report. And I am using "Print When Expression" option on the frame to display it only when a particular field is not null.

In the PDF reported generated, Frame and the data displays fine when the field is not null. But when it is null, frame is not displayed on the PDF but it is leaving a huge empty space. I am not able to figure a way to avoid this.

Please let me know if anyone already found a solution to it.

Here is piece from JRXML pasted below.

<frame>
    <reportElement positionType="Float" x="11" y="90" width="544" height="120" isPrintWhenDetailOverflows="true">
        <printWhenExpression><![CDATA[$F{facutlyMinimumTot} != null]]></printWhenExpression>
    </reportElement>
    <staticText>
        <reportElement positionType="Float" mode="Transparent" x="0" y="0" width="544" height="20" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true">
            <property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
        </reportElement>
        <textElement>
            <font fontName="Arial" size="16" isBold="true"/>
        </textElement>
        <text><![CDATA[Time on Task]]></text>
    </staticText>
    <staticText>
        <reportElement positionType="Float" x="0" y="25" width="544" height="15"/>
        <textElement>
            <font fontName="Arial" size="10" isBold="true"/>
        </textElement>
        <text><![CDATA[Reading and Assignments]]></text>
    </staticText>
    <textField>
        <reportElement positionType="Float" x="0" y="40" width="544" height="15"/>
        <textElement/>
        <textFieldExpression><![CDATA["Minimum Requirement: "+$F{facutlyMinimumTot}]]></textFieldExpression>
    </textField>
    <textField>
        <reportElement positionType="Float" x="0" y="55" width="544" height="15"/>
        <textElement/>
        <textFieldExpression><![CDATA["This Syllabus has "+ $F{facutlyAllActivityTot}]]></textFieldExpression>
    </textField>
    <staticText>
        <reportElement positionType="Float" x="0" y="75" width="544" height="15"/>
        <textElement>
            <font fontName="Arial" isBold="true"/>
        </textElement>
        <text><![CDATA[Participation and other course-work
    ]]></text>
    </staticText>
    <textField>
        <reportElement positionType="Float" x="0" y="90" width="544" height="15"/>
        <textElement/>
        <textFieldExpression><![CDATA["Minimum Requirement: "+$F{studentMinimumTot}]]></textFieldExpression>
    </textField>
    <textField>
        <reportElement positionType="Float" x="0"
									

what's your interest