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

Mail merge help.

edited July 2002 in General
We are running a mail merge but I want to format Floats to show as 2 decimal
places or as a currency when they are displayed. is there anyway this can be
done. I've tried changing the display text from the query that its working
off, but no joy.

Thanks in advance,
Steve

Comments

  • edited July 2002
    You can create a calculated field of string type and use the OnCalcFields
    event of the data set to format the float as a string using FormatFloat or
    something of the type.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited July 2002
    Thanks Alexander, but isn't there a better way to do it.

    I'm using a TQuery, I've been trying to set the option for "currency = True"
    to display the values as currency. This works really well for data grids
    etc.... However this does not seem to work with Report Builder? I am working
    with a number of tables whilst doing this and I really don't want to have to
    make 30 or 40 calc fields just to solve this problem. Is there any way I can
    get report builder to pick up this setting?

    Steve


  • edited July 2002
    You can use an event to format the text yourself though I doubt that would
    be easier than the previous solution. If you need 30 to 40 calc fields
    coming from fields of the same data type you can do this with a simply loop
    rather than having to create all of them manually.

    You can also check out RBAddOns. They provide a more capable RichText
    component which might allow you to do this.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.