Please Help - Abort DC_PRINTER:ATSAY

This forum is for eXpress++ general support.
Message
Author
User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Abort DC_PRINTER:ATSAY

#11 Post by Tom »

Code: Select all

#pragma library('dclix.lib')

FUNCTION Main()
? DC_VersionExpress(0) // full version
? DC_VersionExpress(3) // build number
RETURN nil
Compile and link (without /PM:PM!), put EXE into the folder where your app resides, run it. ;)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Jeanne
Posts: 34
Joined: Thu Jan 28, 2010 8:11 am
Location: Oklahoma, USA
Contact:

Re: Abort DC_PRINTER:ATSAY

#12 Post by Jeanne »

We checked all the DLLs and they are all the current version. Does anyone have any other ideas on why it would abort printing a text file?

They can print these text files to the printer from notepad.

Could this be a missing font issue when printing a text file?

The printer window never even displays to let the user select a printer.

Jeanne

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Please Help - Abort DC_PRINTER:ATSAY

#13 Post by rdonnay »

Jeanne -

It makes very little sense to me that you would be getting an error on graStringAt() if the printer dialog never displayed. This means that the print job started and it's trying to print some text, but there was never a print object.

I am concerned when you say the printer dialog never displays.
You may need to put some debugging in the eXpress++ _dcprc.prg file to see why. See below.

Then rebuild dclipx.dll by running build19_sl1.bat.

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

The eXpress train is coming - and it has more cars.

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Please Help - Abort DC_PRINTER:ATSAY

#14 Post by bwolfsohn »

Jeanne,

Can this computer print ANYTHING ?? or does it just abort on this report ??

Could it be a contaminated printer driver ??

Brian
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

Jeanne
Posts: 34
Joined: Thu Jan 28, 2010 8:11 am
Location: Oklahoma, USA
Contact:

Re: Please Help - Abort DC_PRINTER:ATSAY

#15 Post by Jeanne »

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.
Could it be a contaminated printer driver ??
I have asked them to get their tech to upgrade the printer driver. I am still waiting on it to get done.

Yesterday I sent them the tool called "Dependency Walker" and I am waiting to get a file back on the results from running it. If that doesn't help me clear this up then I will send them the modified DCLIPX.DLL that Roger had me add the two debug lines to.

Thanks
Jeanne

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Please Help - Abort DC_PRINTER:ATSAY

#16 Post by bwolfsohn »

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.
Jeanne,

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.
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

Jeanne
Posts: 34
Joined: Thu Jan 28, 2010 8:11 am
Location: Oklahoma, USA
Contact:

Re: Please Help - Abort DC_PRINTER:ATSAY

#17 Post by Jeanne »

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.
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.

Jeanne

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Please Help - Abort DC_PRINTER:ATSAY

#18 Post by bwolfsohn »

Is ths a single user ?? or a multi-user ?

If multi, can other users print this ?

1. different printer than your other reports.

I'm not suggesting you try another printer.. i'm wondering if it's possible another printer might be selected in your code for this report.


So, for this question, you shell from within your program to print the file ?? what is the command you are using to do this ?

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.
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

Post Reply