# Multiply the values of the textboxes in rdlc

• ### Question

• Hi MSDN,

How can we multiply the values of the text boxes(reportitems) in rdlc report?

Ex. The expression of TextBoxResult report item is:

=Reportitems!TextBoxPrice.Value * Reportitems!TextBoxQuantity.Value

Thanks a lot guys in advance...

Sincerely,

Charlie

Monday, January 31, 2011 7:10 AM

• Hi MSDN,

How can we multiply the values of the text boxes(reportitems) in rdlc report?

Ex. The expression of TextBoxResult report item is:

=Reportitems!TextBoxPrice.Value * Reportitems!TextBoxQuantity.Value

Thanks a lot guys in advance...

Sincerely,

Charlie

Once you converted value fields to the proper data type (CDbl is fine for converting and getting if the result is fractional, you can multiply as always:

Dim result As Double = _
CDbl(Reportitems!TextBoxPrice.Value)*CDbl(Reportitems!TextBoxQuantity.Value)

HTH.

Best regards, Saygılarımla, Onur Güzel

• Proposed as answer by Thursday, February 3, 2011 8:21 AM
• Marked as answer by Friday, February 4, 2011 5:15 AM
Monday, January 31, 2011 9:26 AM

### All replies

• Double.Parse(TextBoxPrice.Value) or Val(TextBoxPrice.Value)

the Double.Parse or Val converts the string to Double data type.

What version of VB are you using?

Monday, January 31, 2011 7:31 AM
• Hi MSDN,

How can we multiply the values of the text boxes(reportitems) in rdlc report?

Ex. The expression of TextBoxResult report item is:

=Reportitems!TextBoxPrice.Value * Reportitems!TextBoxQuantity.Value

Thanks a lot guys in advance...

Sincerely,

Charlie

Once you converted value fields to the proper data type (CDbl is fine for converting and getting if the result is fractional, you can multiply as always:

Dim result As Double = _
CDbl(Reportitems!TextBoxPrice.Value)*CDbl(Reportitems!TextBoxQuantity.Value)

HTH.

Best regards, Saygılarımla, Onur Güzel

• Proposed as answer by Thursday, February 3, 2011 8:21 AM
• Marked as answer by Friday, February 4, 2011 5:15 AM
Monday, January 31, 2011 9:26 AM