docs: public Record getNextRecord(PrintWriter out, int iPrintOptions, boolean bFirstTime, boolean bHeadingFootingExists)
          throws DBException
      {
          Object[] rgobjEnabled = null;
          boolean bAfterRequery = !this.getMainRecord().isOpen();
          if (!this.getMainRecord().isOpen())
              this.getMainRecord().open();    // Make sure any listeners are called before disabling.
          if (bHeadingFootingExists)
              rgobjEnabled = this.getMainRecord().setEnableNonFilter(null, false, false, false, false, true);
  
          Record record = this.getNextGridRecord(bFirstTime);
  
          if (bHeadingFootingExists)
          {
              boolean bBreak = this.printHeadingFootingData(out, iPrintOptions | HtmlConstants.FOOTING_SCREEN | HtmlConstants.DETAIL_SCREEN);
              this.getMainRecord().setEnableNonFilter(rgobjEnabled, (record != null), bBreak, bFirstTime | bAfterRequery, (record == null), true);
          }
          return record;
  
      }