Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2004
    Posts
    5

    Unanswered: Foxpro2.6 and Xp and "Cannot find HPFDJC02.DRV"

    Please can anybody help me with a Foxpro2.6 legacy program that has worked well on 95/98/Me but now has a problem on XP. When attempting to print a report I get an error "Cannot find HPFDJC02.DRV"?

  2. #2
    Join Date
    Dec 2003
    Posts
    104
    Foxpro stores the printer information i.e., printer name, orientation, paper tray, paper size etc., as well as the actual default printer driver which was in use on the computer used by the developer of the report. So, you can either determine which printer driver you need to install which includes the file 'HPFDJC02.DRV', or you can 'fix' the report files themselves, provided they are standalone and not built into the executable.
    To do this, first make a backup, then open the report file as a table using USE MyReport.FRX and BROWSE it. The very first record in the table contains printer info only. Tab to the Expr memo field and open it. You can remove anything that references a specific printer or print queue, but you can leave any other lines having to do with other properties such as orientation, paper, copies, etc.
    Next, tab to the Tag memo field and open it. It will look like a jumble of junk characters with maybe some readable text. Totally empty that field out. Do the same with the Tag2 field. Close the table and try running the report again.
    DSummZZZ

    Even more Fox stuff at
    www.davesummers.net/foxprolinks.htm

  3. #3
    Join Date
    Jan 2004
    Posts
    5
    Dave...thanks very much...that was exactly what I was looking for!

  4. #4
    Join Date
    Dec 2003
    Posts
    104
    You're welcome. Glad it worked for you.

    Just curious, which did you end up doing, installing the driver or editing the .FRX?
    DSummZZZ

    Even more Fox stuff at
    www.davesummers.net/foxprolinks.htm

  5. #5
    Join Date
    Jan 2004
    Posts
    5

    Smile

    This program is for distribution and so needs to work with the default printer on the user's machine. I found the HPFDJ file on the HP site and placed it with all the other .drv files in Windows. That did not solve the problem. Does it actually need to be installed?

    The HPFDJ file is for an HP DeskJet and to the best of my knowledge we have never had one in the office when this application was developed. So I assume HP must have used that .drv as part of the driver package for a non Desk Jet printer. We have Laser Jets

    I have explored the .frx files. The expr cells were all empty and there was a grab bag of printer drivers including some "HPFDJ" and garbage "characters" in some of the Tag cells.

    In your first e-mail you said "provided they are standalone" they can be fixed. And if they are not? Since this is for distribution and I have to build the executable will emptying the Tags work or will the references to HPFDJ simply return when I build the executable again?

    Thanks

  6. #6
    Join Date
    Dec 2003
    Posts
    104
    Does it actually need to be installed?
    No. If you remove any references to it in the .FRX, you can use any printer driver.

    ..."provided they are standalone" they can be fixed. And if they are not?
    What I meant was, as long as the reports were not already included into a distributable .EXE, you could modify them. If this was an app someone had already compiled, you wouldn't be able to access the report files themselves. As long as it's an application you are distributing, you can.

    ...will emptying the Tags work or will the references to HPFDJ simply return when I build the executable again?
    Yes, it will work. Keep in mind though that every time you modify the report directly from Foxpro and save it, those fields will be updated. (I consider this a shortcoming of Microsoft, but oh well). So before you compile or distribute the reports, be sure to remove that info.
    I have made myself a little routine that will do this for me automatically. I'll post the code after this, but if you want, you can even write a little routine to USE the project file, scan through it for report files and then process the following code for each one.
    Anyway, here it is. Pass the name of the report file to it like so, leaving off the extension:
    DO FixRepo WITH 'MyReport'
    Code:
    *..... FixRepo.PRG  .....
    PARAMETER rptname
    
    STORE rptname + '.frx' TO rptname
    USE &rptname
    GO TOP
    REPLACE expr WITH ''
    REPLACE TAG  WITH ''
    REPLACE tag2 WITH ''
    USE
    DSummZZZ

    Even more Fox stuff at
    www.davesummers.net/foxprolinks.htm

  7. #7
    Join Date
    Jan 2004
    Posts
    5
    Dave...thanks again I will work on it over the weekend and let you know how I fare!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •