How to display a custom number of elements horizontally?

后端 未结 2 1422
野性不改
野性不改 2021-01-06 04:14

I want to display elements horizontally (in one \"line\"). I\'m imagining this problem like a table with one row and dynamic number of columns. Each cell in this table conta

2条回答
  •  迷失自我
    2021-01-06 04:39

    Based on your above comment, I would say that it is not that difficult to print a list of elements horizontally. A List component is basically a subreport. So, you could also create a custom List component, which prints a list of elements horizontally. All you need is to create a new report without any margins, set it's "Print Order" to "Horizontal" and set the number of columns as per your requirements. You could then embed this report as subreport in some main report and print elements horizontally.

    Based on your requirements, you can set the report and text-field sizes accordingly. Here's the screenshot for that report I created:

    enter image description here

    And here's the sample jrxml document that I created:

    
    
        
        
        
        
            
        
        
            <band splitType="Stretch"/>
        
        
            
        
        
            
        
        
            
                
                    
                    
                    
                
            
        
        
            
        
        
            
        
        
            
        
    
    

提交回复
热议问题