Ricerca numero evento
Struttura
Ricerca numero evento
Parametri
nessuno
Valore restituito
Numero intero
Descrizione
Importante: questa funzione è utilizzabile solo durante l'azione di trigger "Dopo la creazione del documento", come configurato nello script dell'evento. Questa funzione restituisce il numero dell'evento che ha generato questo lavoro di stampa.
Esempio
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, "Pagina [Pagina] di [Totale]")
sFile3 = sNewFileName
' sWhere = "WHERE EVENT_NUM = " & sMostRecentEvent & " AND COMPANY = '" & sCompany & "'"
sWhere = "WHERE EVENT_NUM = " & sMostRecentEvent
UpdateBlobWithFile("CERTS", "CERT_RTF", sWhere, sFile3)
end if
Compatibilità delle applicazioni
Gestione della calibrazione IndySoft, Gestione dei laboratori commerciali IndySoft, Gestione degli strumenti IndySoft
Vedi anche
Nessun argomento correlato |