Home Devices

Printing Red on a Star DP8340

edited November 2008 in Devices
Can some one help me with setting up a "On Print" Event that will print red.
I can change a Label/variable in red by changing the Font from the format
toolbar but I would like to have only certain values print in red and others
black. My printer can print in red and I have had other labels print in red.
For some reason I can't get conditional printing in red.

Comments

  • edited November 2008
    Hi Pazzaz,

    Inside the OnPrint event of a text object, something like the following will
    work...

    if then
    ppLabel1.Font.Color := clRed
    else
    ppLabel1.Font.Color := clBlack;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2008
    I tried what you suggest bellow and it didn't work. I put a label with
    OnPrint Event set like discibed bellow and another label beside it with
    changing the the font from the dropdown list and when I tried it the OnPrint
    printed black and the second label printed red.

    My font dropdown list includes :
    Control
    ESC_FONT
    Printer 12cpi
    Printer 12cpi (RED)
    Printer 6cpi
    Printer 6cpi (RED)

    For my second label I highlight label2 and change it to Printer 12cpi(RED)
    and that works for printing but it shows black on the preview screen.

    ------------------------------------------------------------------------
    As a simple test, create a new empty report. Add a single Label.

    In the Label.OnPrint event code

    ppLabel1.Font.Color := clRed;

    Now preview and print.

    If that does /not/ work, then the printer cannot print red - due to some
    limitation or it is out of red ink.

    On the other hand, if the test works, then the issue in your real report, is
    that the if..else is executing the else portion. To test that try


    if then
    ppLabel1.Font.Color := clRed
    else
    ppLabel1.Font.Color := clBlue







    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

  • edited November 2008
    From: Pazzaz...

    That did the trick Thank You Very Much...........




    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.