Hello!
I wish to export data using a report (EXPORT) data in external - Application "AUFNAHME" . So i import the exported file (Ascii) again in the running Form. Only the export file is created. But the Import part is locked? I recognized that the manually Import function is not available anymore. So i must leave and restart Sesame again to end the Import-part.
why is the import is locked and the subroutine Importieren() does not happen.
must i use two Button one for the Export und One for the Import? Thank you for your help.
...
Subroutine Importiere()
var n as Int var vLfdNr as Int var vsucheab as String var VCL as String var vFile as String var vFH as Int var vASC as String = "F:\Sesame2\Data\EXPORT\AUFNAHMEHeute.TXT" var vStr as String var vRun as Int var vSpec as String var vdatei as String
Loiter(4000) //@Msg("Das Exportieren ist fertig und Danke fürs Warten..")
vSpec = "Importiere von AUFNAHME"
vRun = @LoadImportSpec(vSpec) If vRun = 1 { If FileExists(vASC ) { RunImportSpec(vASC) } Else { @Msg("Ich finde die import Datei nicht " + vASC) } } Else { @Msg("Die Import spec name " + vSpec +" nicht vorhanden!") }
End Subroutine
IF @Mode() = 0 { vList1 = "SEROLOGIE;CHEMIE;Abb"
PopupSelectPosition(3, @XPos(ThisElement) + (@Width(ThisElement) / 2) , @YPos(ThisElement) + @Height(ThisElement)) vDatei = @PopupChoiceList("@m" + @Replace(vList1, ";", ";@m"), " Welche Datei möchten Sie importieren?") vdatei = @Replace(vdatei, "@m", "")
IF vDatei <> "abb" then { vRSMax = @XResultSetSearch(@FN,"SEROLOGIE", 0,2, "!LfdNr=Max1") IF vRSMax > -1 then { vMax = @XResultSetValue(vRSMax, "LfdNr") vMax = @str(@replace(vMax,",00000000","")) } XResultSetClose(vRSMax)
vRSHandle = @XResultSetSearch("Data\MDLAUFNAHME.DB", "Aufnahme", 0,2, "!LfdNr=>" + vMax , "!SEROLOGIE=YES" ) IF(vRSHandle > -1) Then { XResultSetSort(vRSHandle, "LfdNr:1") vRSRecordCount = @XResultSetTotal(vRSHandle) IF @ASKUSER("SIND SIE SICHER DASS SIE ", vRSRecordCount + " DATENSÄTZE EXPORTIEREN","UND HIER IMPORTIEREN MÖCHTEN?") = "YES" THEN { vFileName = @XResultSetPrintReport("EXPORT",vRSHandle, 4)
XResultSetClose(vRSHandle)
@MSGBOX(vRSRecordCount + " Aufträege wurden zu Datei " + sPath + vExportFile," exportiert","")
IMPORTIERE()
} }
} else @MSGBOX(" Leider KEINE Datensätze für den export ","zu " + vExportFile," gefunden Für Hilfe fragen Sie einfach Herrn Dr. Belhareth") }
Throwfocus(Ruhe)
|