Table of Content
HAL Forum
procedure FormLabelGrid (
integer CountX,integer Width,integer CountY,integer Height)
Description:
Creates a printing grid for fitting more than one label on a page that is being printed.
Parameters:
CountX The horizontal count of grid squares
Width The width of one grid square
CountY The vertical count of grid squares
Height The height of one grid square
global
procedure DoAdrLabForm(record RcVc Dummyr,record RcVc RepSpec)
begin
  Integer i,rwcnt;  
  Boolean printf;
  Integer intdocnr;
  string 30 formcode;
  record FormDefVc FDr;
  row FormDefVc FDrw;

  FDr.repname = RepSpec.repname;
  FDr.shortname = RepSpec.shortname;
  if (ReadFirstMain(FDr,1,true)==false) then begin
    MessageBox(1624, " " & USetStr(1623));
    goto LDoAdrLabForm;
  end;
  rwcnt = MatRowCnt(FDr);
  
  intdocnr = 1;
  printf = true;
  while (printf) begin  
    formcode = "";
    for (i=rwcnt-1;i>=0;i=i-1) begin
      MatRowGet(FDr,i,FDrw);
      if (Getformcode(i,FDrw.intdocnr,FDrw.FPCode,FDrw.UserGroup,FDrw.LangCode,FDrw.SerNr,-1,"",
                      "",intdocnr,"",formcode)) then
      begin
        goto LBREAKAdrLab;
      end;
    end;
LBREAKAdrLab:;
    if (nonblank(formcode)) then begin
      DoAdrLabFormPrint(RepSpec,formcode,FDrw.PrintGroupCode);
    end else begin
      printf = false;
      if (intdocnr==1) then begin
        MessageBox(1624, " " & USetStr(1623));
      end;
    end;
    intdocnr = intdocnr + 1;
  end;
LDoAdrLabForm:;
  return;
end;  
Related topics:
««