code: private XSSFCellStyle updateSubreportBandElementStyle(XSSFCellStyle cellStyle, BandElement bandElement, Object value, int gridRow, int gridColumn, int colSpan) {
      	if (subreportCellStyle == null) {
      		return cellStyle;
      	}
      	    	    	    	
      	if (gridColumn == 0) {    		
      		cellStyle.setBorderLeft(subreportCellStyle.getBorderLeft());    	
      		cellStyle.setLeftBorderColor(subreportCellStyle.getLeftBorderColor());    	
      	} else if (gridColumn+colSpan-1 == bean.getReportLayout().getColumnCount()-1) {    		
      		cellStyle.setBorderRight(subreportCellStyle.getBorderRight());
      		cellStyle.setRightBorderColor(subreportCellStyle.getRightBorderColor());
      	}     	    	
      	
      	if (pageRow == 0) {    		    		
      		cellStyle.setBorderTop(subreportCellStyle.getBorderTop());  
      		cellStyle.setTopBorderColor(subreportCellStyle.getTopBorderColor());  
      	} else if ( (pageRow+1) == getRowsCount()) {    	    		
      		cellStyle.setBorderBottom(subreportCellStyle.getBorderBottom());    	
      		cellStyle.setBottomBorderColor(subreportCellStyle.getBottomBorderColor());
      	}    	
      	    
      	return cellStyle;
      }
docs: If a border style is set on a ReportBandElement we must apply it to all subreport cells