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

setting the displayformat on a data-aware text label on the report.

edited April 2008 in General
I have a report that is using data-aware labels. The data I have has
characters in them from a mask that was previously set for the data. So
In the Get-Format event of the label, I clean up the unwanted
characters and then I would like to apply the display format to the
value of the label or the text, how is this done? Is the GetFormat
event the best place to do this?

--

Comments

  • edited April 2008
    Hi Semone,

    Yes, you will want to use the OnFormat event to apply a custom display
    format to your DBText components. See the TppDBText.OnFormat topic in the
    RBuilder help for more information on how this event should be used.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2008
    Nico Cizik (Digital Metaphors) wrote:


    Hello Nico and thanks for the reply. I have read your message and the
    help info on this event. I still have one question. How do you apply
    the format to the text after I have manipulated the data? Example:

    Original_Value = ((345-34)398-7
    Manipulate_Value = 345343987
    DisplayFormat = 000\-00\-0000;1;_

    How do I assign the DisplayFormat = to the manipulate_Value?

    --
  • edited April 2008
    Hi Semone,

    By using this event, you now have complete control over how the value is
    formatted. You would need to use a Delphi routine (or your own) such as the
    FormatFloat() to format the value and set it equal to the text parameter.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2008
    Nico Cizik (Digital Metaphors) wrote:


    Ok I understand now. Thanks!

    --
This discussion has been closed.