Hello,
I have a custom valuetype that is implicit castable to a decimal and a double.
When used in a report in interpretation mode it is not possible to do any calculations with it.
I like to be able to do simple math with it like {obj1 + obj2}
Is this possible?
Regards, Ivar
using Sum with a custom valuetype
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: using Sum with a custom valuetype
Hello,
It should work.
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
It should work.
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Re: using Sum with a custom valuetype
I'll have to put some things together to create a proper sample. I get back to you.
Re: using Sum with a custom valuetype
I created a sample that shows the problem.
The operators.png shows that the type has operators available to do math.
The 'can be casted.png' shows that the type can be casted to a decimal/double.
The 'Errormessage.png' shows the error I get.
The preferred solution would be that Stimulsoft uses the operators and could sum Money with Money.
A less preferred solution would be that Stimulsoft casts the Money to a decimal and does the math with that.
Thanks!
The operators.png shows that the type has operators available to do math.
The 'can be casted.png' shows that the type can be casted to a decimal/double.
The 'Errormessage.png' shows the error I get.
The preferred solution would be that Stimulsoft uses the operators and could sum Money with Money.
A less preferred solution would be that Stimulsoft casts the Money to a decimal and does the math with that.
Thanks!
- Attachments
-
- StimulsoftValueType.zip
- (78.16 KiB) Downloaded 144 times
-
- Operators.png (5.37 KiB) Viewed 2015 times
-
- ErrorMessage.png (59.26 KiB) Viewed 2015 times
-
- Can be casted.png (2.19 KiB) Viewed 2015 times
Re: using Sum with a custom valuetype
Hello.
We have made an improvement.
Your code will work as expected with our next build.
Thank you.
We have made an improvement.
Your code will work as expected with our next build.
Thank you.
Re: using Sum with a custom valuetype
Thanks! Much appreciated.
A question: Will it use the operators or will it cast to decimal?
A question: Will it use the operators or will it cast to decimal?
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: using Sum with a custom valuetype
Hello,
Is used a cast to decimal.
Thank you.
Is used a cast to decimal.
Thank you.