How to calculate percentage increase..
Posted: Wed Jun 23, 2010 11:48 pm
Hi all,
i am trying to increase the price in some datafield in a databand with this method:
in a form i have a TextBoxControl (TextBox1) where i input the number after in the Condition of the DataFiled i use this Expression:
but when i run the report i receive this message : error CS0019: Operator '/' cannot be applied to operands of type 'decimal' and 'string'.
and this one too:
and i get this error CS0029: Cannot implicitly convert type 'decimal' to 'bool'
My purpose is to increase the real price of the field in the database with a percentage that input in the TextBox1 for all rows refering to the column of the datafield(Transport_TBL._2Pax_RealContractCost) as Transport_TBL._2Pax_RealContractCost + 5% and show in the datafield the result of the calculation.
Do you know how can work out this error ?
p.s . I not need the total of the column of the datafield Transport_TBL._2Pax_RealContractCost.
Thanks so much for your attention.
Have a good time.
Cheers
i am trying to increase the price in some datafield in a databand with this method:
in a form i have a TextBoxControl (TextBox1) where i input the number after in the Condition of the DataFiled i use this Expression:
Code: Select all
Transport_TBL._2Pax_RealContractCost / TextBox1.Text *100
and this one too:
Code: Select all
(Transport_TBL._2Pax_RealContractCost / System.Convert.ToDecimal(TextBox1.Text) * 100)
My purpose is to increase the real price of the field in the database with a percentage that input in the TextBox1 for all rows refering to the column of the datafield(Transport_TBL._2Pax_RealContractCost) as Transport_TBL._2Pax_RealContractCost + 5% and show in the datafield the result of the calculation.
Do you know how can work out this error ?
p.s . I not need the total of the column of the datafield Transport_TBL._2Pax_RealContractCost.
Thanks so much for your attention.
Have a good time.
Cheers