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

OnGetTextEvent

edited August 2002 in General
Hi,

I have a report created in code. I have a TppDBText that needs to check a
value in a given column. If that value matches, I need to bold the text in
the TppDBText. The problem is that it is bolding the entire column instead
of just the matching value. How can I avoid this? I have also, stepped
through the OnGetText Event, it works, but I was wondering why it fires
about 10 times for the same TppDBText instead of just once? It seems to do
more work than it needs to. Any help would be appreciated.

TIA,

--
Jada C. Case
Programmer
jada@signaldata.com

Comments

  • edited August 2002
    Make sure you have an else clause in your bolding logic. For example:

    if (condition) then
    bold
    else
    not bold


    PS. Please don't post twice.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited August 2002
    If I put in the else clause, it only bolds the very last item it finds. If
    I leave it out, it bolds the whole column. The reason it only bolds the
    last one with the else clause it because the event gets fired so much, how
    could I control this?



    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited August 2002
    Use the DetailBand's BeforePrint event instead rather than the OnGetText.
    The former will fire once, the latter will fire multiple times.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.