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

ppDBRichText text background color

edited July 2005 in General
I want to set the ppDBRichText background color based on a condition. In
the detail band before print procedure I do:

if something then
ppDBRichText.Color := clRed
else
ppDBRichText.Color := clWhite;

On report preview, this works except that the actual text background is
still the original color (white). The transparent property of the
ppDBRichText component was set to false. When the transparent property is
set to true, the background color of the text is correct, but there are two
major unacceptable problems. One, the text quality becomes unreadable and
two, the time to draw the page doubles. Is there any way to get this work
correctly? I hate to say it but using transparent = true works fine with
Quick Report, which I'm trying to replace. (Delphi 7, ReportBuilder7.02).
Thanks for any suggestions.

Comments

  • edited July 2005
    Hi Stan,

    Unfortunately this is not currently a feature of the RichText components in
    ReportBuilder. Transparency is also a complex feature that does not work
    correctly for most printer drivers. Some work-arounds you might try are
    using the TppRTFEngine.ChangeBackgroundColor class function located in the
    ppRichTxDrwCmd.pas file, or using the Transparent property with larger font
    or zooming in on the Preview to see the text better. The printer output
    should be correct.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2005
    Nico,
    Thanks for the quick replies to my 2 questions. I have decided to change the
    report and put the component inside a shape. Then I can just change the
    shape's color when I need to.


This discussion has been closed.