public static List < ExpressionBean > getExpressions ( ReportLayout layout ) { List < ExpressionBean > expressions = new LinkedList < ExpressionBean > ( ) ; for ( Band band : layout . getBands ( ) ) { for ( int i = 0 , rows = band . getRowCount ( ) ; i < rows ; i ++ ) { List < BandElement > list = band . getRow ( i ) ; for ( BandElement be : list ) { if ( be instanceof ExpressionBandElement ) { if ( ! expressions . contains ( ( ExpressionBandElement ) be ) ) { expressions . add ( new ExpressionBean ( ( ExpressionBandElement ) be , band . getName ( ) ) ) ; } } } } } return expressions ; }
Get expression elements from report layout