setting the displayformat on a data-aware text label on the report.
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?
--
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?
--
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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?
--
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Ok I understand now. Thanks!
--