Table of Content
HAL Forum
procedure PrintDocument (
record AnyRecord,string FormName,boolean Preview)
Description:
Evokes a printing procedure for a specified record - using a user defined document form.
Parameters:
AnyRecord Record that will be used in combination with the document form to generate the output.
FormName The name of the form that will be used for generating the docment.
Preview Determines if the generated document should be opened in preview window.
updating procedure CreateAndAttachPdfIV(record IVVc IVr)
begin
  string 255 fname,docname;
  
  fname = "tmp/" & IVr.SerNr & ".pdf";
  SetDocumentFilename(fname);
  SetMedia(mtPdf);
  docname = "InvForm";
  if (IVr.InvType==2) then begin docname = "CashInvForm"; end;
  if (IVr.InvType==3) then begin docname = "CredInvForm"; end;
  if (IVr.InvType==4) then begin docname = "IIInvForm"; end;
  if ((nonblank(IVr.PRCode)) and (IVr.InvType==1)) then begin
    docname = "ProjInvForm";
  end;
  PrintDocument(IVr,docname,false);
  if (FileExists(fname)) then begin
    RecordLinkFile(fname,0,IVr,CurrentCompany);
  end;
  SetDocumentFilename("");
  Delete_File(fname);
  
  RETURN;
END;
Related topics:
««