Es wurde eine Druckfunktion aufgerufen, obwohl noch kein Druckjob gestartet wurde
Code: Alles auswählen
proc drucke(file)
//
config_druck(file) // OK
drucke_jetzt(file) // Rückgabewert -4
//
return
#include "cmbtll10.ch"
procedure config_druck(file)
LOCAL ctxt:= MemoRead(file), ;
lName:="LL_txt.lst"
LL10ModuleInit()
//D: List & Label Job oeffnen und handle holen
hJob := LlJobOpen(-1)
LlDefineVariableExt(hJob, "Inhalt", ctxt, LL_TEXT, 0 )
LlDefineLayout(hJob, SetAppWindow():GetHWND(),"Designer", LL_PROJECT_LIST, lName )
LlJobClose(hJob)
LL10ModuleExit()
return
#include "cmbtll10.ch"
PROCEDURE drucke_jetzt(file)
LOCAL ctxt:= MemoRead(file), ;
lName:="LL_txt.lst"
LL10ModuleInit()
hJob := LlJobOpen(-1)
LlDefineVariableExt(hJob, "Inhalt", ctxt, LL_TEXT, 0 )
// List & Label Druckjob starten
LlSetPrinterDefaultsDir(hJob, Hauptpfad)
nRet := LlPrintWithBoxStart(hJob, ;
LL_PROJECT_LIST, ;
lName, ;
LL_PRINT_PREVIEW, ;
LL_BOXTYPE_NORMALWAIT, ;
SetAppWindow():GetHWND(), ;
"Druckvorschau")
//
msgbox(str(nRet,10,0))
//
nLLError := LlPrint(hJob)
msgbox(str(nLLError,10,0))
// List & Label-Job beenden
LlJobClose(hJob)
LL10ModuleExit()
RETURN