Frame leaves empty space when not displayed in PDF report

Course Queries Syllabus Queries 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years 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>
     positionType="Float" x="11" y="90" width="544" height="120" isPrintWhenDetailOverflows="true">
        
    
    
         positionType="Float" mode="Transparent" x="0" y="0" width="544" height="20" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true">
             name="net.sf.jasperreports.print.keep.full.text" value="true"/>
        
        
             fontName="Arial" size="16" isBold="true"/>
        
        
    
    
         positionType="Float" x="0" y="25" width="544" height="15"/>
        
             fontName="Arial" size="10" isBold="true"/>
        
        
    
    
         positionType="Float" x="0" y="40" width="544" height="15"/>
        
        
    
    
         positionType="Float" x="0" y="55" width="544" height="15"/>
        
        
    
    
         positionType="Float" x="0" y="75" width="544" height="15"/>
        
             fontName="Arial" isBold="true"/>
        
        
    
    
         positionType="Float" x="0" y="90" width="544" height="15"/>
        
        
    
    
         positionType="Float" x="0"
profilepic.png
manpreet 2 years ago

Hidden elements leave blank space behind by default. To avoid this you should set the property isRemoveLineWhenBlank to true on the element, in this case the frame.

However, if there are other elements that share the same line and are visible, it will not be possible to collapse the space.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.