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

Spool32 Error on TppViewer.Print

edited December 2001 in General
When I try to print something from the component TppViewer with the
procedure ppViwer.Print, sometimes it brings on an error like 'Invalid
Parameter' or 'Canvas does not allow drawing' making a program called
Spool32 crack and i receive an 'Illegal Operation' message and have to close
it.
The error occurs before the printing itself, while transfering to the
printer buffer the page 27 for instance.
Then, when I restart the Windows, i receive a notice saying that I have
something to be printed, and it prints correctly up to the page which
brought on the error.
This error happens in all the computers I tried, with win98, win2000 and
other.

How can I solve this problem?

PS: Maybe it's unimportant, but there is a small TppImage in my report...

Daniel Lazzari

Comments

  • edited December 2001
    Could it be a problem in one of your report's event handlers?

    Can you make a report which prints only the problematic page, ie. alter the
    dataset and/or report layout so that it prints that one page?

    Are there any event handlers for this report? What are they doing? Can you
    trace through the delphi event handlers for the report?

    If there is an image, does a report with just that image in it print?

    Can you describe your report layout in more detail?

    Usually, the best way I get a report to work,is by taking it apart piece
    (remove report components) by peice, until the problem goes away. Once a
    component is changed or removed, and the report begins working, then you
    know where to start in figuring out how to create a sample report and
    sending it to us at support@digital-metaphors.com


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited December 2001
    The report has just one page, and it's something for a bank, with
    barcode, dates and the ammount of money to pay. The image is the bank's
    logo.
    This error doesn't happen every time, it's something around one in 5
    times when i try to print. Depends on the data. But it's someting like this:
    it's a one page report that takes the data from some records and makes a
    page for each record. The pages are the same, only the information changes.
    And the error occurs when I perform the procedure TppVewer.Print. Which
    event handlers could be causing this exception? And how do some of the
    records print normally and it comes to one that brings on this error, just
    by changing the texts of the labels and the numbers of the barcode? Is it
    possible that the error is in a delphi class like TPrinter.Canvas?

    Daniel Lazzari

This discussion has been closed.