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

Word wrap with TppLabel

edited July 2002 in General
When I use a TppLabel on a report, if I have the WordWrap property set to
"true", my printer driver is loaded and unloaded 50-100 times when the
report is printed. I can see this happen if I turn on the Delphi event log
(View -> Debug Windows -> Event Log). It causes roughly a 10-15 second
delay in generating the report on screen. This behavior goes away if I set
the wordWrap property to "false". Also, I don't see this behavior in the RB
IDE's "preview" tab.

Also, setting the TppReport.PrinterSetup.PrinterName property to 'Screen'
has no effect. or TppReport.Units := utScreenPixels.

What can I do to get rid of the printer driver load/delay?

Comments

  • edited July 2002
    Tried to reproduce with Lexmark Optra and HP LaserJet - no luck.

    What OS/Printer/Delphi/RB versions are you using?

    Cheers,

    Tom Ollar
    Digital Metaphors Corporation
  • edited July 2002
    I'm using Windows 2000 Professional, with RB v6.03, and an HP LaserJet 8000
    Series PCL 6 printer (mapped network printer). If you turn on "View->Debug
    Windows->Event Log" while the project is running, you can see the printer
    driver loaded and unloaded ~30-50 times (maybe more, I didn't count). As
    soon as you turn word-wrap off, it's OK. I've seen the exact same behavior
    when using a TppDBMemo, as well. However, this only happens at runtime.
    The preview in the designer doesn't do this.

    Thanks.


  • edited July 2002
    I tried this using an HP LaserJet 4Si, and didn't have the problem. Why
    would this happen only on certain printers?

  • edited July 2002
    I've been able to reproduce this with a LaserJet 5. The modules are loaded
    when RB queries certain values from the printer device. My first though was
    that the module containing the win32 call was being reloaded so I tried
    loading the library manually only once and making a direct call to the
    method via it's pointer. This didn't change anything however. Therefore it
    seems that this behavior is completely dependent on the driver for the
    particular printer or it's interaction with the win32 api functions which
    talk to it.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.