Table of Content
HAL Forum
function Boolean LoopMain (
Record NameVc Namer,Integer seg,Boolean TrHs)
Description:
Loop with a main index
Parameters:
Namer Record
seg Number of fields in index (for complex indexes)
TrHs true - continue loop, false - stop loop
global
procedure AgreementForm2(record RcVc RepSpec,Boolean detailed)
BEGIN
  record AgreementVc Agreementr;
  Boolean TrHs,tmpf;
  LongInt afr,ato;
  record RcVc rsr;
  
  RecordCopy(rsr,RepSpec);
  if (blank(RepSpec.f1)) then begin
    goto LAgreementForm2;
  end;
  afr = FirstInRange(RepSpec.f1,10);
  ato = LastInRange(RepSpec.f1,10);
  Agreementr.SerNr = afr;
  TrHs = true;
  while (LoopMain(Agreementr,1,TrHs)) begin
    if (TrHs) then begin
      if (nonblank(RepSpec.f1)) then begin
        if (Agreementr.SerNr>ato) then begin
          TrHs = false;
        end;
      end;
    end;
    if (TrHs) then begin
      tmpf = PrintDocument(Agreementr,RepSpec.repname,false);
      if (detailed) then begin
        rsr.long1 = Agreementr.SerNr;
        rsr.repname = "RentResForm";
        RentResForm(rsr);
      end;
    end;
  end;
LAgreementForm2:;
  RETURN;
END;

Related topics:
««