Page 1 of 1
Filters with Numerical
Posted: Wed May 07, 2008 11:36 am
by pca
Hello
Filters with Numerical
I expressions with numerical values where int functioning properly:
PatoMovim.MovHaberMa >= (int)PatoMovim.Parameters["@Value"]. ParameterValue
but it does not work with float
PatoMovim.MovHaberMa >= (float)PatoMovim.Parameters ["@ Value"]. ParameterValue
Error:
Method: [DatosPatoMovim__GetFilter]
Specified cast is not valid.
How should I do?
thanks you
Patricio
Filters with Numerical
Posted: Wed May 07, 2008 1:25 pm
by Edward
Please try to modify your expression as follows:
Code: Select all
(floaf)PatoMovim.MovHaberMa >= (float)PatoMovim.Parameters ["@ Value"]. ParameterValue
Thank you.
Filters with Numerical
Posted: Wed May 07, 2008 1:47 pm
by pca
Hello Edward
This did not work
Again
---------------------------
Method: [DatospatoMovim__GetFilter]
Specified cast is not valid.
---------------------------
Thank you.
Filters with Numerical
Posted: Mon May 12, 2008 10:44 am
by Edward
Please change your expression as follows and it'll work:
Code: Select all
(double)PatoMovim.MovHaberMa >= (double)PatoMovim.Parameters ["@ Value"]. ParameterValue
Also please set type of the parameter to double too, if it possible.
This is just a temporary solution.
The issue with converting will be fixed a bit later.
Thank you.
Filters with Numerical
Posted: Thu May 15, 2008 9:16 am
by pca
Hello Edward
This did not work
(double)PatoMovim.MovHaberMa >= (double)PatoMovim.Parameters ["@ Value"]. ParameterValue
Error :
Method: [DatospatoMovim__GetFilter]
Specified cast is not valid.
The solution is:
System.Convert.ToDouble(PatoMovim.MovHaberMa) >= System.Convert.ToDouble(PatoMovim.Parameters ["@ Value"]. ParameterValue)
Thank you.
Filters with Numerical
Posted: Thu May 15, 2008 9:59 am
by Edward
Thank you very much for this tip. It really works for any type of the parameter! :biggrin:
And it is not necessary to change the type of the parameter from int to double.
Thank you.