CercaStampaAzienda
Struttura
CercaStampaAzienda
Parametri
nessuno
Valore restituito
Stringa
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 la società proprietaria del bene attualmente selezionato nell'evento e applicabile a 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 |