=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateReportCategoryAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateReportCategoryAction.java 2011-07-28 09:50:39 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateReportCategoryAction.java 2011-10-25 08:52:49 +0000 @@ -54,9 +54,9 @@ throws Exception { OrganisationUnit organisationUnit = organisationUnitSelectionManager.getSelectedOrganisationUnit(); - + ExportReportCategory exportReportInstance = (ExportReportCategory) exportReport; - + this.installReadTemplateFile( exportReportInstance, period, organisationUnit ); for ( Integer sheetNo : exportReportService.getSheets( selectionManager.getSelectedReportId() ) ) @@ -93,13 +93,13 @@ if ( reportItem.getItemType().equalsIgnoreCase( ExportItem.TYPE.DATAELEMENT_NAME ) ) { - ExcelUtils.writeValueByPOI( rowBegin, reportItem.getColumn(), String.valueOf( dataElementGroup - .getName() ), ExcelUtils.TEXT, sheet, this.csText12BoldCenter ); + ExcelUtils.writeValueByPOI( rowBegin, reportItem.getColumn(), dataElementGroup.getName(), + ExcelUtils.TEXT, sheet, this.csText12BoldCenter ); } else if ( reportItem.getItemType().equalsIgnoreCase( ExportItem.TYPE.DATAELEMENT_CODE ) ) { - ExcelUtils.writeValueByPOI( rowBegin, reportItem.getColumn(), String.valueOf( dataElementGroup - .getCode() ), ExcelUtils.TEXT, sheet, this.csText12BoldCenter ); + ExcelUtils.writeValueByPOI( rowBegin, reportItem.getColumn(), dataElementGroup.getCode(), + ExcelUtils.TEXT, sheet, this.csText12BoldCenter ); } rowBegin++; === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateReportOrgGroupListingAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateReportOrgGroupListingAction.java 2011-10-25 07:52:27 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateReportOrgGroupListingAction.java 2011-10-25 08:52:49 +0000 @@ -175,22 +175,22 @@ } else if ( reportItem.getItemType().equalsIgnoreCase( ExportItem.TYPE.SERIAL ) ) { - ExcelUtils.writeValueByPOI( rowBegin, reportItem.getColumn(), String.valueOf( serial ), - ExcelUtils.NUMBER, sheet, this.csTextSerial ); + ExcelUtils.writeValueByPOI( rowBegin, reportItem.getColumn(), serial + "", ExcelUtils.NUMBER, + sheet, this.csTextSerial ); } else if ( reportItem.getItemType().equalsIgnoreCase( ExportItem.TYPE.DATAELEMENT ) ) { double value = this.getDataValue( reportItem, o ); - ExcelUtils.writeValueByPOI( rowBegin, reportItem.getColumn(), String.valueOf( value ), - ExcelUtils.NUMBER, sheet, this.csNumber ); + ExcelUtils.writeValueByPOI( rowBegin, reportItem.getColumn(), value + "", ExcelUtils.NUMBER, + sheet, this.csNumber ); } else if ( reportItem.getItemType().equalsIgnoreCase( ExportItem.TYPE.INDICATOR ) ) { double value = this.getIndicatorValue( reportItem, o ); - ExcelUtils.writeValueByPOI( rowBegin, reportItem.getColumn(), String.valueOf( value ), - ExcelUtils.NUMBER, sheet, this.csNumber ); + ExcelUtils.writeValueByPOI( rowBegin, reportItem.getColumn(), value + "", ExcelUtils.NUMBER, + sheet, this.csNumber ); } rowBegin++; === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/importing/action/ViewDataCategoryAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/importing/action/ViewDataCategoryAction.java 2011-10-24 05:42:25 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/importing/action/ViewDataCategoryAction.java 2011-10-25 08:52:49 +0000 @@ -80,12 +80,14 @@ for ( DataElementGroupOrder dataElementGroup : importReport.getDataElementOrders() ) { + rowBegin ++; + for ( DataElement dataElement : dataElementGroup.getDataElements() ) { ImportItem item = new ImportItem(); item.setSheetNo( importItem.getSheetNo() ); - item.setRow( rowBegin++ ); + item.setRow( rowBegin ++ ); item.setColumn( importItem.getColumn() ); item.setExpression( importItem.getExpression().replace( "*", dataElement.getId() + "" ) ); === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/importing/action/ViewDataOrganizationGroupAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/importing/action/ViewDataOrganizationGroupAction.java 2011-10-25 07:52:27 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/importing/action/ViewDataOrganizationGroupAction.java 2011-10-25 08:52:49 +0000 @@ -103,7 +103,7 @@ Collections.sort( organisationUnits, new OrganisationUnitNameComparator() ); - row += 2; + row ++; for ( OrganisationUnit o : organisationUnits ) { @@ -112,7 +112,7 @@ ImportItem item = new ImportItem(); item.setSheetNo( importItem.getSheetNo() ); - item.setRow( importItem.getRow() + row ); + item.setRow( importItem.getRow() + row + 1 ); item.setColumn( importItem.getColumn() ); item.setExpression( o.getId() + "_" + importItem.getExpression() );