rafaelviana Posted May 6, 2010 Share Posted May 6, 2010 When I'm working with multiple columns the column footer appears in each column.Is there any way to show the footer only in the latest column of the latest page? Link to comment Share on other sites More sharing options...
slow Posted May 7, 2010 Share Posted May 7, 2010 uhm...you can show a texfiled only in the last column using this print when expressionnew Boolean($V{COLUMN_NUMBER}.intValue()==3)use the max number of columns instead of 3...and placing this textfield in the first column footer.in this way it appears in all pages but only on the 3° column.if you 'd show it only in the last page, you can use the last page footer band or the summary band;in this bands there aren't columns so, you can place your field under the last columns... ____________________________________if it works... give me KARMA points please! : ) ____________________________________ Post Edited by slow at 05/07/2010 08:37 Link to comment Share on other sites More sharing options...
rafaelviana Posted May 14, 2010 Author Share Posted May 14, 2010 Ok. Thanks.But it isn't enough because if I fix the value in 3 for example.There can be situation that only 1 column is filled, so the footer will not be showed. How can I know the number of total columns instead of use the static value.eg: 3? Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted May 19, 2010 Share Posted May 19, 2010 The only way to do something special in the last page is by using the last page footer band, until you are not using a custom datasource able to tell you if there are more records or no.Giulio Link to comment Share on other sites More sharing options...
rafaelviana Posted May 20, 2010 Author Share Posted May 20, 2010 Thanks! I got it! In the datasource i put it:private final int COLUMNS = 5;private final int RECORDS_PER_COLUMN = 55;private int LAST_PAGE;private int LAST_COLUMN; LAST_PAGE = (int) Math.ceil( ((double) numero.size()) / (COLUMNS * RECORDS_PER_COLUMN ) );LAST_COLUMN = (int) Math.ceil( ( ((double)(numero.size()) % (COLUMNS * RECORDS_PER_COLUMN )) / RECORDS_PER_COLUMN ) ); And in the column footer i put this expression:new Boolean ( $V{COLUMN_NUMBER}.equals($F{LAST_COLUMN}) && $V{PAGE_NUMBER}.equals($F{LAST_PAGE}) ) i think it also could be make inside the Ireport switching the fields by the expression used in Java, the size of the list is in the variable: REPORT_COUNT.Something like this, only needs to find a manner to use the Math.ceilnew Boolean ( $V{COLUMN_NUMBER}.equals($(int) Math.ceil( ( ((double)(REPORT_COUNT) % (5 * 55)) / 55 ) )) && $V{PAGE_NUMBER}.equals( (int) Math.ceil( ((double) REPORT_COUNT) / (5 * 55 ) )) ) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now