protected ITableContent createTableContent(IReportContent report, int colNumber, int rowCount) {
   ITableContent table = report.createTableContent();
   for (int i = 0; i < rowCount; i++) {
     ITableBandContent band = report.createTableBandContent();
     band.setBandType(ITableBandContent.BAND_DETAIL);
     IRowContent row = createRowContent(report, colNumber);
     band.getChildren().add(row);
     row.setParent(band);
     table.getChildren().add(band);
     band.setParent(table);
   }
   return table;
 }
 public void startTableBand(ITableBandContent band) throws BirtException {
   if (cellEmitter != null) {
     cellEmitter.startTableBand(band);
   } else {
     if (!isNestTable()) {
       if (band.getBandType() == IBandContent.BAND_GROUP_FOOTER) {
         int groupLevel = getGroupLevel();
         resolveCellsOfDrop(groupLevel, false, true);
       }
       if (hasDropCell()) {
         layoutEvents.push(new LayoutEvent(LayoutEvent.START_BAND, band));
         return;
       }
       flush();
     }
     emitter.startTableBand(band);
   }
 }
Esempio n. 3
0
  private void refineBandContent(ITableBandContent content) {
    if (isHeaderRefined) return;

    Collection children = content.getChildren();
    ArrayList removed = new ArrayList();
    if (children != null) {
      Iterator itr = children.iterator();
      while (itr.hasNext()) {
        IRowContent rowContent = (IRowContent) itr.next();
        RowDesign rowDesign = (RowDesign) rowContent.getGenerateBy();
        if (rowDesign != null && !rowDesign.getRepeatable()) {
          removed.add(rowContent);
        }
      }
      children.removeAll(removed);
    }
    isHeaderRefined = true;
  }
 public void endTableBand(ITableBandContent band) throws BirtException {
   if (cellEmitter != null) {
     cellEmitter.endTableBand(band);
   } else {
     if (!isNestTable()) {
       if (LayoutUtil.isRepeatableBand(band)) {
         lastRowId = -1;
       }
       if (band.getBandType() == IBandContent.BAND_GROUP_FOOTER) {
         int groupLevel = getGroupLevel();
         resolveCellsOfDrop(groupLevel, true, isContentFinished(band));
       }
       if (hasDropCell()) {
         layoutEvents.push(new LayoutEvent(LayoutEvent.END_BAND, band));
         return;
       }
       flush();
     }
     emitter.endTableBand(band);
   }
 }