Code: Select all
#pragma library('dclix.lib')
FUNCTION Main()
? DC_VersionExpress(0) // full version
? DC_VersionExpress(3) // build number
RETURN nil
Code: Select all
#pragma library('dclix.lib')
FUNCTION Main()
? DC_VersionExpress(0) // full version
? DC_VersionExpress(3) // build number
RETURN nil
Code: Select all
IF nDialogStyle = 2
wtf 'here' pause
oDlg := XbpPrintDialog():new()
oDlg:enablePrintToFile := .t.
oDlg:enableNumCopies := .t.
oDlg:enableCollate := .t.
oDlg:numCopies := nCopies
IF !Empty(nFrom) .AND. !Empty(nTo)
oDlg:pageRange := { nFrom, nTo }
oDlg:pageRangeSelected := { nFrom, nTo }
ENDIF
oDlg:create()
lSelect := .f.
/*
oPrinter := oDlg:display()
IF oDlg:status() > 0
oDlg:configure()
oDlg:destroy()
ENDIF
*/
oThread := Thread():new()
Sleep(10)
oThread:start({||oPrinter := _PrinterDialog(oDlg,oPrinter,@lSelect)})
DO WHILE !lSelect
nEvent := AppEvent(@mp1,@mp2,@oXbp,10)
IF Valtype(oXbp) = 'O'
oXbp:handleEvent(nEvent,mp1,mp2)
ENDIF
ENDDO
wtf 'here too' pause
Sleep(10)
IF Valtype(oPrinter) # 'O'
SetAppFocus(oFocus)
DC_ClearEvents()
RETURN nil
ENDIF
Can this computer print ANYTHING ?? or does it just abort on this report ?
I have asked them to get their tech to upgrade the printer driver. I am still waiting on it to get done.Could it be a contaminated printer driver ??
Jeanne,Jeanne wrote:FYI: This is the school sec that we are working with most of the time.
Can this computer print ANYTHING ?? or does it just abort on this report ?
YES it prints all other reports from within our application. It even prints these text files from notepad. It only abort on a text file from within the application. I can run the application on my computer and print these same reports and others are as well.
This only happens on this one system not in mine or anywhere else I have tired it. Currently she has no other printer to test it on. The file is created and can be printed from notpad afterwords.does it print any other text files from within your app or just this text file ??
Does it write the text file successfully ??
If it prints all other reports but textfiles, the problem is not a printer driver, but it has GOT to be in your code or environmental control by process of elimination. You are doing something different in your text file printing.. It could be any of the following:
1. different printer than your other reports.
2. rights/permissions where the textfile is being saved.
3. rights/permissions on the actual text file.. perhaps your app isn't releasing/closing the file properly before you try to print it..
4. how are you actually printing the text file ?? do you write it to a file and then shell to send it to the printer ?? then perhaps it's the environment of the shell that is throwing the problem.