LookupPrintEventNum
Structure
LookupPrintEventNum
Parameters
none
Return Value
Integer
Description
Important: this function is only usable during the 'After Document Creation' trigger action as setup in event script. This function returns the Event # of the event that created this print job.
Example
sMostRecentEvent = IntToStr(LookupPrintEventNum)
if sMostRecentEvent <> "" then
sCompany = LookupPrintCompany
sCertName = ReturnFromSQL("SELECT CERT_FILE_NAME FROM CERTS WHERE EVENT_NUM = " & sMostRecentEvent)
sDocName = ReturnFromSQL("SELECT FILE_NAME FROM EVENTDOCS WHERE EVENT_NUM = " & sMostRecentEvent)
sFile1 = GetIndySoftTempDir & sCertName
sFile2 = GetIndySoftTempDir & sDocName
sFileName1= ReturnBlobTofile("SELECT CERT_RTF FROM CERTS WHERE EVENT_NUM = " & sMostRecentEvent, sFile1)
sFileName2= ReturnBlobToFile("SELECT DOC_BLOB FROM EVENTDOCS WHERE EVENT_NUM = " & sMostRecentEvent, sFile2)
sCertName = Left(sCertName, Len(sCertName) - 4)
sDocName = Left(sDocName, Len(sDocName) - 4)
sNewFileName = GetIndySoftTempDir & sCertName & sDocName & ".pdf"
AppendPDFFilesRepaginate(sFile1, sFile2, sNewFileName, "Page [Page] of [Total]")
sFile3 = sNewFileName
' sWhere = "WHERE EVENT_NUM = " & sMostRecentEvent & " AND COMPANY = '" & sCompany & "'"
sWhere = "WHERE EVENT_NUM = " & sMostRecentEvent
UpdateBlobWithFile("CERTS", "CERT_RTF", sWhere, sFile3)
end if
Application Compatibility
IndySoft Calibration Management, IndySoft Commercial Lab Management, IndySoft Tool Management
Also See
No related topics |