How to multiply 2 data fields?
-
- Posts: 74
- Joined: Sun May 20, 2007 9:14 pm
- Location: Singapore
How to multiply 2 data fields?
Hi, I have just started using this stimulReport.net.
I have a questions & I hope someone in the forum can help me.
How do I create a calculated fields? For example, I want to multiply 2 data fields in the database together (Qty) * (Unit Price)
Thanks.
I have a questions & I hope someone in the forum can help me.
How do I create a calculated fields? For example, I want to multiply 2 data fields in the database together (Qty) * (Unit Price)
Thanks.
Smile
Chan Kuan Leang
Chan Kuan Leang
How to multiply 2 data fields?
Please see the following flash tutorial:
http://www.stimulsoft.com/livedemos/Rep ... ields.html
Thank you.
http://www.stimulsoft.com/livedemos/Rep ... ields.html
Thank you.
-
- Posts: 74
- Joined: Sun May 20, 2007 9:14 pm
- Location: Singapore
How to multiply 2 data fields?
Thanks. I have saw it. But, it does not allow to multiply Data Type Double & DecimalEdward wrote:Please see the following flash tutorial:
http://www.stimulsoft.com/livedemos/Rep ... ields.html
Thank you.
Is there another way to go about it?
Is there anyway to change the type or convert the data from Double to Decimal
Thank you so much.
Smile
Chan Kuan Leang
Chan Kuan Leang
How to multiply 2 data fields?
In the calculated column definition you may use any expression. The result of that expression must equals to the type of Calculated Column.
So you can type the following in the definition of the Column with decimal type:
Thank you.
So you can type the following in the definition of the Column with decimal type:
Code: Select all
(decimal)Orders.EmployeeID*(decimal)Orders.Freight)
-
- Posts: 74
- Joined: Sun May 20, 2007 9:14 pm
- Location: Singapore
How to multiply 2 data fields?
Thank you so much for helping to solve this problems.Edward wrote:In the calculated column definition you may use any expression. The result of that expression must equals to the type of Calculated Column.
So you can type the following in the definition of the Column with decimal type:Thank you.Code: Select all
(decimal)Orders.EmployeeID*(decimal)Orders.Freight
Smile
Chan Kuan Leang
Chan Kuan Leang
How to multiply 2 data fields?
Let us know if you need any help.
Thank you.
Thank you.
Re: How to multiply 2 data fields?
Hello. I applied that but it didn't work. The code was like that: {Sales.Quantity}*{Sales.Amount} and result was shown as 24*60.000. So, how can I do multiplication of two data on a table
-
- Posts: 7334
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to multiply 2 data fields?
Hello,
You should use the following expression:
{Sales.Quantity * Sales.Amount}
Thank you.
You should use the following expression:
{Sales.Quantity * Sales.Amount}
Thank you.
Re: How to multiply 2 data fields?
It worked! Thank you so muchLech Kulikowski wrote: ↑Tue May 28, 2024 1:51 pm Hello,
You should use the following expression:
{Sales.Quantity * Sales.Amount}
Thank you.

-
- Posts: 7334
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to multiply 2 data fields?
Hello,
You are welcome.
You are welcome.