Table of Content
HAL Forum
procedure SetPrinter (
string Printer)
Description:
Sets the printer to use for printing a document form.
Parameters:
Printer Name of the printer to use.
procedure DoAdrLabFormPrint(record RcVc RepSpec,string formcode,string printer)
BEGIN
  record CUVc CUr;
  string 255 frcu,tocu;
  Boolean TrHs;
  LongInt incnt;
  Integer lbls;
  LongInt j;
  Boolean testf;
  record SysFormatBlock SysFormatRec;
  record LangNrVc LangNrr;

  incnt = 0;
  GetLangNr("",LangNrr);
  BlockLoad(SysFormatRec);
  FormLabelGrid(1,1,1,1);
  frcu = FirstInRange(RepSpec.f1,20);
  tocu = LastInRange(RepSpec.f1,20);
  CUr.Code = frcu;
  TrHs = true;
  while (LoopMain(CUr,1,TrHs)) begin  
    if (TrHs) then begin
      testf = true;
      if (nonblank(tocu)) then begin
        if (CUr.Code>tocu) then begin
          TrHs = false;
        end;
      end;
    end;
    if (CUr.CUType==0) then begin testf = false; end;
    if (TrHs and testf) then begin
      for (j=0;j<RepSpec.long1;j=j+1) begin    
        if (OpenForm(formcode)==false) then begin goto LDoAdrLabFormPrint; end;
        SetPrinter(printer);  
        FormLabelGrid(1,1,1,1);
        AdrLab(RepSpec,CUr,LangNrr,SysFormatRec);
        EndFormLabel;
        CloseForm;
      end;
    end;
  end;
LDoAdrLabFormPrint:;
  RETURN;
END; 
Related topics:
««