Round with Aggregate

Hi,
sorry, but I read the manual - without success.
I created an invoice. In the groupfooter I have a field with an aggregate-function (SUM). It's the sum of the amounts. The next field calculates the processing fee. Adding these fields I often get differences. I think the reason is, that the fields are formatted with 2f but calculated with a lot of decimals more. So it happens, that 7,51+0,23=7,73. Similar Problems happen in Excel. There I fixed it by using round(..,2).
Inside SQL i can use round(Netto*(1+Art.StsProzent/100,2) to get the gross amount.
But what is the Syntax for using the round-function in textfields.
And more simple what is the syntax for the addition of two fields: the fields are named Memo24 and Memo28. I tried [Memo24]+[Memo28] and got a very large integer. [Memo24 + Memo28] made just an error.
How can I wrap the SUM with a round-function. [round(SUM(<Query0."ARTLEKPREISAUFSCHLAG">),2)] makes an error: ..Too many parameters.
Please give me hint where I can find the answers.
Thanks!
Tom

Comments

  • edited 12:13AM
    Hi.

    The 'Round' does not take parameters in FR. How about trying something like this:

    [round(SUM(<Query0."ARTLEKPREISAUFSCHLAG">)*100)/100]

    I don't think that it is esasy to calculate directly from what is inside a memo. I think you should try to use whatever is the source for the memo in your calcluation:

    Memo1: [Query0."NUMBER"]
    Memo2: [sum(<Query0."NUMBER1">)]
    Memo3 (Memo1 + Memo2): [<Query0."NUMBER"> + sum(<Query0."NUMBER1">)]

    Petter
  • edited 12:13AM
    Hi Petter,
    I misunderstood the Syntax of "Round" inside a report.
    Thanks a lot!
    Ciao
    Tom
  • edited 12:13AM
    People have the annoying habit of adding amounts up manually and comparing the result to the summaries on a report. [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> This will always get us into trouble when rounding is applied to numbers just for printing purposes. The only way to deal with this is to round all the numbers outside of the report before the report is printed.[/img]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.