none
Error loading printer driver (1958)

    Question

  •  

    Hi,

     

    I have an application, which have a lot of printing forms. Till now I executes printings with REPORTBEHAVIOR=80. But now I'm trying to use REPORTBEHAVIOR=90. What I did:

     

    1. In my main.prg:

     

    SET REPORTBEHAVIOR 90

    IF FILE("reportpreview.app")

    _reportpreview=ALLTRIM(FULLPATH(CURDIR()))+"reportpreview.app"

    ELSE

    _reportpreview=HOME()+"reportpreview.app"

    ENDIF

    IF FILE("reportoutput.app")

    _reportoutput=ALLTRIM(FULLPATH(CURDIR()))+"reportoutput.app"

    ELSE

    _reportoutput=HOME()+"reportoutput.app"

    ENDIF

     

    All my reports (are excluded from project) are executes with:

    REPORT FORM ..\reports\frx.... TO PRINTER PROMPT PREVIEW

     

    Both *.APP are installed (copied to) in main folder of application

     

    My application is installed on MS Server 2000 to which users connects via MS TerminalServer. There is no VFP copy on server. Only necessary libraries.

     

    The problem occurs when I'm executing report (from app). I have an error:

     

    Error loading printer driver. Code 1958

    DO (_REPORTPREVIEW) with __ReturnObject

     

    It's strange but after few times of unsuccsefull executions of any report, application starts to works and print normally (just like with REPORTBEHAVIOR=80). But when new Server user starts to use my app those errors appears again.

     

    What am I doing wrong?

     

    Andy.

    Monday, September 29, 2008 6:53 AM

Answers

  • At least in my case it was a permission issue, my application couldn't write to the temp folder FoxPro was using. My IT guy "lower" the permissions in those folders and the printing started working. I found out about the folders using Process Monitor, 

    Luis


    Luis

    Tuesday, September 30, 2014 7:51 PM

All replies

  • That is becaz. the printer driver information is saved in your report. So open your report in design mode and uncheck the printer Environment Option in Report Mneu. One more thing Just install any printer Driver on Server too.
     
    Monday, September 29, 2008 10:33 AM
  • Anil,

     

    I always save my report without Printer Environment option.

     

    Andy,

     

    Monday, September 29, 2008 11:45 AM
  • Still an issue?

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Twitter, Wiki)

    Wednesday, October 10, 2012 1:07 AM
    Owner
  • Hi, did you ever find a solution for this? I'm having the same issue. An executable with similar characteristics as yours; reports excludes, only necessary libraries installed on machine, etc...; I can't seem to find a solution for this, have been looking around and nothing. Any help will be appreciated.

    Thanks,

    Luis


    Luis

    Thursday, September 11, 2014 12:15 PM
  • As this is a 6 year old thread, that couldn't be ansered at that time, this link might help. Don't know if this fix was already availlable in 2008.

    http://support.microsoft.com/kb/909283/en-us


    Gruss / Best regards
    -Tom
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible,
    you are, by definition, not smart enough to debug it. 010101100100011001010000011110000101001001101111011000110110101101110011

    Thursday, September 11, 2014 1:12 PM
    Moderator
  • At least in my case it was a permission issue, my application couldn't write to the temp folder FoxPro was using. My IT guy "lower" the permissions in those folders and the printing started working. I found out about the folders using Process Monitor, 

    Luis


    Luis

    Tuesday, September 30, 2014 7:51 PM