dc_printfile problem blowing out printers

This forum is for eXpress++ general support.
Message
Author
BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: dc_printfile problem blowing out printers

#11 Post by BruceN »

Roger:

I've been trying to work with HP on this as every customer who has the issue has an HP printer (not sure if that is causal or coincidental).

We have one customer with 2 stores. When we upgraded her, both stores developed the issue. When we returned her to the older code it went away. Current version uses xbase 355 and your 254 build. older version uses 331 and 245.

Report is generated and printed to a file (report.txt), then using your DC_PRINTFILE() it is printed. We made no change to the code between versions. did you make any changes to DC_PRINTFILE between those versions? Is this likely an xbase issue, or express issue?

thanks,

bruce
There are only 10 kinds of people - those who understand binary and those who don't :)

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

Re: dc_printfile problem blowing out printers

#12 Post by rdonnay »

DC_PrintFile() is very basic and hasn't changed in years.

It uses the DCPRINT system.
You can look at the source code in \exp19\source\dclipx\_dcprc.prg.

Have you tried printing anything else with DCPRINT ON?

If that works and DC_PrintFile() doesn't work, then there is something strange going on with DC_PrintFile().
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: dc_printfile problem blowing out printers

#13 Post by BruceN »

i haven't but i will. it may take a few days as i will have limited free time this weekend and early next week.

here's the really bizarre thing:

Only a few of our users have reported the issue. We have hundreds of users who are using the latest version of our program with no difficulty. For those who do have the issue... most reports work fine, only a few cause the problem. It isn't always the same few reports at different customers (even though thay are ALL printed to file, then the file sent to the printer.).

There is no difference in the printing code between the 2 version of our program. Both send reports to a file (report.txt) and use DC_PRINTFILE() function to print the file.

one thought i had was that it could be tied to the size of the font (terminal) we use (std or compressed). but that isn't the case. in my test system in which i can reproduce problem (with an hp 1020) some condensed reports print fine, only one (that i've found so far) causes print spooler crash.

here's the code we use.. nothing convoluted.

if cVar = 'Y'
if lVar
mfont ='7.'+m_font+'.Bold'
else
mfont ='11.'+m_font+'.Bold'
endif
else
if lVar
mfont ='7.'+m_font
else
mfont ='11.'+m_font
endif
endif
DC_PRINTFILE(m_file,rpt_to_scr,mfont,aOptions)

thanks
There are only 10 kinds of people - those who understand binary and those who don't :)

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: dc_printfile problem blowing out printers

#14 Post by BruceN »

i have not had time to try the print to, but i did try something else and found out something interesting:

- i have 2 machines, notebook and TEST on network. both are running win 7 pro. when i try to print certain reports off TEST to my hp1020 i get the spooler crash. if i copy the data files, exes, and dlls to my notebook and run the same report printing to the hp1020 shared on TEST, it prints fine.

- if run the report on my notebook (to create the REPORT.TXT file), then run the report on TEST and while viewing the report i copy the notebook REPORT.TXT (which printed fine) to TEST, then hit print... i STILL get the spooler crash. That tells me it isn't anything in the report file we're creating.

i'll try to write something to read the file then print it using PRINT ON.

thanks,

bruce
There are only 10 kinds of people - those who understand binary and those who don't :)

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: dc_printfile problem blowing out printers

#15 Post by BruceN »

I still haven't had time to try the straight DC PRINT ON. I'm hoping to be able to this weekend.

I did, however, discuss this with a friend of mine that works for mickeysoft. He suggested that we try stepping thru the dc_printfile() function that is in the _ dcprc.prg. I've tried everything I know (which I freely admit isn't much - if you took everything I know about this and shoved it up a gnat's ass it would rattle around like a pea in a boxcar), but I haven't been able to figure out how to do that.

How can I get the VX debugger to allow me to get into that code instead of just pulling the fcn from the dll?

thanks,

bruce
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
sdenjupol148
Posts: 151
Joined: Thu Jan 28, 2010 10:27 am
Location: NYC

Re: dc_printfile problem blowing out printers

#16 Post by sdenjupol148 »

Hey Bruce,

Just a quick question; if you're creating same file name everytime, do you first delete the file already there or simply write over it?

Bobby

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: dc_printfile problem blowing out printers

#17 Post by BruceN »

we just overwrite it. it's never caused an issue. the file is there after the crash and can be opened and printed from notepad fine.

i did get to try the dcprint on... and it seems to work. i have one setup here that crashed with the dcprintfile and now doesn't with dcprint on. i'm going to be able to try the dcprint on in 2 or 3 other locations that crash next week. hopefully they will also print fine.

thanks,

bruce
There are only 10 kinds of people - those who understand binary and those who don't :)

MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

Re: dc_printfile problem blowing out printers

#18 Post by MIGUELON »

Hey Bruce, what happened to me the same when running dc_printfile () print queue is was breaking windows.
I fails with XP and Windows Server 2008, do not know if I could also go with W7

The best solution I've found is:
Convert the file. "TXT" TO "PDF" and viewed with Adobe Reader

Regards
Miguel

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: dc_printfile problem blowing out printers

#19 Post by BruceN »

Roger:

I've tried it in 3 locations that had the printing the problem... using the dcprint on fcn works without an issue... dc_printfile causes the blowout.
There are only 10 kinds of people - those who understand binary and those who don't :)

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

Re: dc_printfile problem blowing out printers

#20 Post by rdonnay »

It may have something to do with the ENABLECANCEL clause that is being used in DC_PrintFile().

Give this a try:

Comment out the ENABLECANCEL clause in _DCPRC.PRG.

Rebuild DCLIPX.DLL by running BUILD19_SL1.BAT.
The eXpress train is coming - and it has more cars.

Post Reply