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

TppDBRichText with mixed records

edited May 2006 in End User
Delphi 6 Update Pack 2,
ReportBuilder 7.03

Hi,

I have a report with a DBRichText linked to a BlobField.
This Field is sometimes with plain text and sometimes with RTF text, and
when it renders plain text content it uses the text attributes of the last
RTF it printed.
Is there a way to avoid this?
How can I reset those attributes before printing any records?

Thank you in advance,
Massimiliano

Comments

  • edited May 2006
    Hi Massimiliano,

    Take a look at the TextAttributes property of the RichText component. Try
    adjusting these attributes before the component is printed.

    Also, you could also try placing two components (DBRichText and DBText) and
    toggle the visibility of each depending on the data type.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    I think the property is SelAttributes, but I cannot change anything of it.
    For example this code gives me an error:

    Mem_Nota_Comp.SelAttributes.Color := clBlack;

    Why?

    Massimiliano.


  • edited June 2006
    Hi Massimiliano,

    What error are you receiving? Do you have Graphics added to your uses
    clause. You first need to select the text that you would like to change.
    For instance, you could use the SelStart and SelLength to define the amount
    of text you want edited.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.