Home Devices

page style and PCL printers

edited April 2003 in Devices
Hello,
I have a page style which is set to all pages, on the first page I have
other information which is "printed" on top of my page style so I can't see
it. This is the effect I require.
But there are some printers that don't work this way and I can see the text
from my page style as well as my first page text, the result is overlapping
text.

Printers in Question :
Brother HL-1260e (driver 4.42)
Xerox 470 ST (enhanced driver)

With reportbuilder 7.0 I can overcome this problem with a RAP procedure, but
I also have a version running 5.56 with no RAP is there any other way round
this ?

Also in reportbuilder 7.0 I tried setting the pages for my PageStyle the
problem is the reports can be 3000 pages, I can enter 2-999 but when I try
2-9999 reportbuilder hangs.

thanks

Alex

Comments

  • edited April 2003
    1. Use the BeforePrint event of the PageStyle band to do this type of code:
    ppLabel1.Visible := (Report.AbsolutePageNo <> 1)

    2. This is Delphi's slow implementation of string manipulation. Even 2-999
    is slower than I'd like to see. We rely on the Format function in SysUtils
    which is getting called 998 or 9998 times in this case. There were some good
    text search and replace articles in the Delphi Informant in the past year or
    so, Specifically, discussing implementing a Boyer-Moore algorithm and its
    advantages, in comparison with Delphi's implementation of string
    manipulation.

    On a related note, the TextSearch preview feature allows you to replace the
    text search toolbox class (the class methods for search and replace). See
    ppTextSearchToolbox.pas for an example of registering a toolbox class and
    the public virtual class methods which are called by the text search engine
    that you can override in a descendent, if you wanted to use Boyer-Moore for
    example, as we relied on Delphi's implementation for the default.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited April 2003
    Thanks for that information, but for my reportbuilder 5.56 I don't have
    access to RAP or the events so can't code a solution
    like "ppLabel1.Visible := (Report.AbsolutePageNo <> 1)"

    Is there anyway round it just using the object properties ?

    all the best

    Alex

  • edited April 2003
    In this case, it is up to the printer driver to determine if the text should
    or should not render when it detects that a shape more to the front in the
    ZOrder, overwriting it. You'll have to use code, either RAP or Delphi code
    to manipulate this object to toggle its visibilty.

    Another way to do it, is to rebuild the application. Create a TppDBText
    descendent. You can code something in an override to not create a draw
    command output for the text when a new property is set to true
    (PrintOnFirstPage). Use the CreatePopupMenu override to add an option to the
    popup menu in the designer so you end user can set this. Then publish the
    boolean property on the descendent and register the component as a
    replacement for the TppDBText. In order to not create text in the draw
    command, you could either override GetTheText to returnan empty string when
    Report.AbsolutePageNo = 1 or override the PropertiesToDrawCommand routine. I
    haven't tried this but this may be a solution, although you'll still have to
    redeploy the app. Can you redeploy using RB 7.02 using a RAP event handler
    instead- this would be easier than maintaining a custom component in an old
    version of RB and the time spent on upgrading the app to RB 7.02 will give
    you more feature options over 5.56 as you move forward in maintenance with
    that app. Just a suggestion:)

    Here is an example of creating a custom dbText component:
    http://www.digital-metaphors.com/tips/AutoAssignFormat.zip


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.