Home RAP

Using RAP to display different price information

edited August 2011 in RAP
HI,

I am new to RAP.

I am attempting to show a pricing value,according to the amount of the
value.

For example

PRICE VALUE = 0.99 show as 99c
PRICE VALUE = 1.99 show as $1.99 with $ symbol and cent portion using
smaller font.


How can I do this?

Kind Regards,

Robert.

Comments

  • edited August 2011
    Hi Robert,

    Generally for formatting solutions like this one you could simply use
    the DisplayFormat property of the DBText/DBCalc component. If you right
    click over the component and select "Display Format" you will be given a
    number of options as well as the ability to customize your own format.

    RAP is a full featured programming language. If you need to take
    complete control over the text output, you could implement the OnGetText
    event of the DBText and essentially write pascal code to alter its
    value. See the Language tab at the bottom right of the code window for
    some of the helpful formatting routines available.

    Best Regards,

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