code: private Integer internalGetLastRow() {
          if(_dataSetSize != null) {
              /*
                29 / 10: 0-9, 10-19, 20-29          _lastRow = 20
                30 / 10: 0-9, 10-19, 20-29, 30-39   _lastRow = 30
                31 / 10: 0-9, 10-19, 20-29, 30-39   _lastRow = 30
                32 / 10: 0-9, 10-19, 20-29, 30-39   _lastRow = 30
  
                29 - (29%10) = 20
                30 - (30%10) = 30
                30 - (30%10) = 30
                36 - (36%10) = 30
  
                12 / 2: 0-1, 2-3, 4-5, 6-7, 8-9, 10-11, 12-13 _lastRow=10
                12 / 5: 0-4, 5-9, 10-14 _lastRow=5
               */
              int lastRow = getPageSize() * (int)Math.floor((double)(_dataSetSize.intValue()-1) / (double)getPageSize());
              return new Integer(lastRow);
          }
          else return null;
      }
docs: Internal method used to calculate the last row given a data set size.
  @return the last row or <code>null</code> if the last row can not be calculated