How to Round to x Decimal places in memo field
Hi,
I've been attempting to do a rounding of a calculated value in a memo in my report without success. Fast Report shows (as an online example) Round(1.478, 2) = 1.48
Seems simple enough, yet no matter how I try to implement anything like this in the memo field, I just get exceptions raised, and told "too many parameters". The closest I come to something working is:
[Round((<frxDB1."ln37">/<frxDB1."count">)*100)]
As soon as I try to introduce ',2' anywhere, I get told "too many parameters" EG [Round((1.234),2)] will trigger an error.
I've used rounding operations on all sorts of platforms and applications, so no new concept over here. Fast Reports just not playing nice... You'll notice my example that does work, does not specify to how many decimal places it should round, so it defaults to none. IE 28.9 becomes 30.
What am I missing here?
As a side note, where do I go online to view other formulae structure etc. that can be carried out from within a memo. I am fully aware of the user manual found here: https://www.fast-report.com/public_download...rMan/index.html
however this does not seem to provide information about correctly structuring formulae within a memo field (well the search does not find anything anyway, try typing Round for example). Online searching provides no useful results either, aside from the brief hint mentioned at the top of this post.
I've been attempting to do a rounding of a calculated value in a memo in my report without success. Fast Report shows (as an online example) Round(1.478, 2) = 1.48
Seems simple enough, yet no matter how I try to implement anything like this in the memo field, I just get exceptions raised, and told "too many parameters". The closest I come to something working is:
[Round((<frxDB1."ln37">/<frxDB1."count">)*100)]
As soon as I try to introduce ',2' anywhere, I get told "too many parameters" EG [Round((1.234),2)] will trigger an error.
I've used rounding operations on all sorts of platforms and applications, so no new concept over here. Fast Reports just not playing nice... You'll notice my example that does work, does not specify to how many decimal places it should round, so it defaults to none. IE 28.9 becomes 30.
What am I missing here?
As a side note, where do I go online to view other formulae structure etc. that can be carried out from within a memo. I am fully aware of the user manual found here: https://www.fast-report.com/public_download...rMan/index.html
however this does not seem to provide information about correctly structuring formulae within a memo field (well the search does not find anything anyway, try typing Round for example). Online searching provides no useful results either, aside from the brief hint mentioned at the top of this post.
Comments
If you need another function - you may create your own user function. See a Developer's manual "Custom functions writing" chapter