Aller au contenu principal

PrintEstimate

Structure

PrintEstimate(sJobNum, sTemplateName, sPrintType, sPrinter, sEmailAddress : String; bAlwaysCreateNew: Boolean)

Type

Procedure

Description

This function prints an estimate template for the estimate noted with sJobNum. This report can be sent to printer, email, file, temp file, or screen. This procedure should only be called after the estimate has been created.

Parameters: 5
 
sJobNum = the estimate number to be printed.

sTemplateName = the Estimate template from PrintBuilder that should be created

sPrintType = can be either E-MAIL, PRINTER, FILE, or SCREEN. If FILE is used for sPrintType, the sEMailAddress parameter is used for the location of the file. If only the file name is input for sEMailAddress then the file will be created in the IndySoft Temp directory, otherwise the full directory path from sEMailAddress will be used.

sPrinter = only needed if the sPrintType = PRINTER. Value can be either 0, 1, 2, 3, 4, or 5 (enter as text). 0 sends the print job to the Windows default printer. Printers 1-5 map to the printers specified in User/Location Settings.

sEMailAddress = only needed if the sPrintType = E-MAIL, or FILE. This is the email address that will receive the estimate pdf.

bAlwaysCreateNew = a boolean value, True or False. If this is true, then a new estimate revision is always created and saved as an estimate document (estimate documents show as icons in the upper-right header of estimates in the Order System). If this is false, then the most recent estimate (if any) will be recalled. If no estimate revisions have been previously created, a new revision will be made. Important: when bAlwaysCreateNew is False, the ONLY option you can use for sPrintType is FILE. |