Adding a non-printable graphic...

  • I have created a custom TWPFCustomGraphicObject class similar to the labelprinter demo with it's custom button. Basically, this will drop a DB Navigator on the form that is linked to some database table. This single control is thus a container for several child controls.
    When the control is added to the form in runtime, it will also add the table fields to a band in the object inspector so a user could just drop this control on his form and then select the fields from this table. The navigator will allow the user to walk through the table to select the appropiate record.

    This solution has been chosen because the user will, in general, drop about half a dozen of these controls on his form, each linked to a different table. One for salespersons, one for customers, one for articles, etc.

    The problem, however, is that when the report is printed then these navigators should not be printed! So how do I prevent them from being printed in either the preview or the true print-out?

    • Offizieller Beitrag

    Hi,

    that's an excellent design idea.

    TWPFOneGraphicOption = (wpfHidden, wpfHiddenOnFirstPage, wpfHiddenOnLastPage,
    wpfHiddenOnOddPages, wpfHiddenOnEvenPages,
    wpfDoNotPrint, wpfUseDoubleBuffer, wpfCrossable,
    wpfLocked, wpfLockedPosition, wpfNoSelection);

    wpfDoNotPrint should do it

    These options are in obj.data.Options

    Julian