JasperReport - wrap text to show long text in textfield

前端 未结 2 1894
不知归路
不知归路 2020-12-01 03:57

I am using jasper report as reporting tool in my application. And I am wondering how can i wrap the long text by expanding the reportElement dynamically into ve

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-01 04:00

    I found the answer myself :

    I did some extra research about the properties of textField and rectangle components. And found that I need to set the following properties.

    For rectangle :

            
                
            
    

    For textField :

            
                ...
            
    

    Output as expected :

    enter image description here

    The ... section after correction :

    
            
                
                    
                
                
                    
                    
                    
                
                
                    
                
                
                    
                    
                    
                
            
        
    

    UPDATE

    You can also set property net.sf.jasperreports.print.keep.full.text to true to achieve that across your all reports.

提交回复
热议问题