>PNTotalP = 0 && total pages >ln_total = 0 && local total during adding >ll_again = .T. >DO CASE >&& I sql'ed the table for the report and _tally returns the number of records >&& my report holds 6 records on the first page and 8 on the rest > CASE _TALLY <= 6 > PNTotalP = 1 > ll_again = .F. > CASE _TALLY >6 > PNTotalP = 1 > ln_total = _TALLY - 6 && This will give us the remaining records to count. > > DO WHILE ll_again && More than 7 records exist on the order. > IF ln_total > 8 > PNTotalP = PNTotalP + 1 > ln_total = ln_total - 8 > ENDIF > IF ln_total < 8 AND ln_total > 0 && If less that 7 records exist on the order. > PNTotalP = PNTotalP+1 > ll_again = .F. > ENDIF > ENDDO >ENDCASE >>