Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Access violation on .Print

edited March 2003 in General
RB 6.03 starts throwing access violations when I try to print using
the .Print method. I have examined your demo programs and I cannot
recreate the problem. All 160 demos work OK. Does this mean that my
installation is OK?

Comments

  • edited March 2003
    Please use the same thread when describing the same problem. Thanks,

    Yes, your installation is probably ok. You are using RB 6.03, an older
    version.

    Try this. Install the HP Laserjet 4 (we know this one works well) as your
    default printer (you don't have to have the actual printer hooked up, just
    the driver can be installed) and reboot and relaunch Delphi. RB uses the
    default printer to measure text and to paginate a the layout when designing.
    We have seen printer drivers leak and cause such strange problems. If you
    could tell us your printer that you have installed as your default, then we
    can install that and try to reproduce the problem in RB 7.0. Also, send us a
    demo project or tell me how to reproduce the problem on my machine. Send to
    support@digital-metaphors.com


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited March 2003
    Thanks for getting back to me Jim.


    K.


    K.


    By chance, that is my actual printer, and it is my default.


    Working on it now.

    //---------------------
  • edited March 2003
    Followup:

    If I switch my default printer to HP III I have no access violations.
    They completely disappear. I can design in Delphi, no problem. I can
    run the app, and generate the report (preview) no problem. However,
    when I try to print, to ANY printer, I get a "priveledged
    instructioni" error message, and the print job dies. I cannot get
    anything out of any printer. Problem happens upon calling the .Print
    method. I have nothing in any of the events (nothing in BeforePrint)
    except in the OnPreviewFormCreate I have the code for maximizing the
    window. This code are the two lines from the RB Helps. Previewing
    works OK. Demos print OK.

    Thanks.
  • edited March 2003
    Have you set an HP LJ 4 as the default printer as a test. We have tested
    this driver and it works for us here without problems. I simply want you to
    take the HP LJ III printer driver out of the equation. If the HP LJ 4 driver
    works in your tests, then the HP LJ 3 driver was the cause. If you still get
    errors with the HP LJ 4 as the default printer, then we can move forward
    trying to resolve the issue by an example test project that shows the
    problem using the HP LJ 4 driver and we can try to reproduce the problem
    here so we can debug it.

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.