in a field of the report i have a textbox and i use in the Condition this expression :
when i run the report if i use the Switch statement the first conditionSwitch(Hotel_Meals_TBL.CurrencyCode== "USD" && txtCurrency.Text == "USD",((((System.Convert.ToDecimal(Hotel_Meals_TBL.Dinner) * System.Convert.ToDecimal(txtGOLDENPALACE.Text)) / 100) + System.Convert.ToDecimal(Hotel_Meals_TBL.Dinner))+ System.Convert.ToDecimal(usdGOLDENPALACE.Text)).ToString("N0"),Hotel_Meals_TBL.CurrencyCode == "USD" && txtCurrency.Text == "VND",((((System.Convert.ToDecimal(Hotel_Meals_TBL.Dinner) * System.Convert.ToDecimal(txtGOLDENPALACE.Text)) / 100) + System.Convert.ToDecimal(Hotel_Meals_TBL.Dinner)+ System.Convert.ToDecimal(usdGOLDENPALACE.Text))* System.Convert.ToDecimal(txtReferenceCur.Text)).ToString("N0"))
the report will send a error :Text97 Input string was not in a correct format.Hotel_Meals_TBL.CurrencyCode== "USD" && txtCurrency.Text == "USD",((((System.Convert.ToDecimal(Hotel_Meals_TBL.Dinner) * System.Convert.ToDecimal(txtGOLDENPALACE.Text)) / 100) + System.Convert.ToDecimal(Hotel_Meals_TBL.Dinner))+ System.Convert.ToDecimal(usdGOLDENPALACE.Text)).ToString("N0")
instead if i use the second condition
it is right .Hotel_Meals_TBL.CurrencyCode == "USD" && txtCurrency.Text == "VND",((((System.Convert.ToDecimal(Hotel_Meals_TBL.Dinner) * System.Convert.ToDecimal(txtGOLDENPALACE.Text)) / 100) + System.Convert.ToDecimal(Hotel_Meals_TBL.Dinner)+ System.Convert.ToDecimal(usdGOLDENPALACE.Text))* System.Convert.ToDecimal(txtReferenceCur.Text)).ToString("N0")
Do you know where i wrong in my code ?I am trying to understand but not luck.
Thanks for your attention.
Have a good day.
Cheers