=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Grid.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Grid.java 2011-01-14 17:42:33 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Grid.java 2011-01-21 06:58:41 +0000 @@ -95,7 +95,7 @@ int getVisibleWidth(); /** - * Adds a new row the the grid and moves the cursor accordingly. + * Adds a new row to the grid and moves the cursor accordingly. */ Grid nextRow(); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupsAction.java 2010-08-31 08:12:53 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupsAction.java 2011-01-21 06:58:41 +0000 @@ -44,8 +44,6 @@ public class GetDataElementGroupsAction implements Action { - - // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetExpressionTextAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetExpressionTextAction.java 2010-09-01 16:55:23 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetExpressionTextAction.java 2011-01-21 06:58:41 +0000 @@ -93,7 +93,5 @@ return ERROR; } - } - } === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridPdfResult.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridPdfResult.java 2011-01-14 18:10:02 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridPdfResult.java 2011-01-21 06:58:41 +0000 @@ -80,6 +80,8 @@ Grid _grid = (Grid) invocation.getStack().findValue( "grid" ); grid = _grid != null ? _grid : grid; + + int width = grid.getVisibleWidth() == 0 ? 1 : grid.getVisibleWidth(); // --------------------------------------------------------------------- // Configure response @@ -99,21 +101,21 @@ Document document = openDocument( out ); - PdfPTable table = new PdfPTable( grid.getVisibleWidth() ); + PdfPTable table = new PdfPTable( width ); table.setHeaderRows( 1 ); - table.addCell( getTitleCell( grid.getTitle(), grid.getVisibleWidth() ) ); - table.addCell( getEmptyCell( grid.getVisibleWidth(), 30 ) ); - table.addCell( getSubtitleCell( grid.getSubtitle(), grid.getVisibleWidth() ) ); - table.addCell( getEmptyCell( grid.getVisibleWidth(), 30 ) ); + table.addCell( getTitleCell( grid.getTitle(), width ) ); + table.addCell( getEmptyCell( width, 30 ) ); + table.addCell( getSubtitleCell( grid.getSubtitle(), width ) ); + table.addCell( getEmptyCell( width, 30 ) ); for ( GridHeader header : grid.getVisibleHeaders() ) { table.addCell( getItalicCell( header.getName() ) ); } - table.addCell( getEmptyCell( grid.getVisibleWidth(), 10 ) ); + table.addCell( getEmptyCell( width, 10 ) ); for ( List row : grid.getVisibleRows() ) {