Hi,
Please explain me.
I have an integer variable that receives the result of the getfilter function.
var := table.GETFILTER(year);
This year field is of the same data type of the var variable: integer.
But the system says "type conversion is not possible, integer := text". But the year field is an integer.
Later on, I need to add 1 to that value: year + 1. And this error will appear again. I read the evaluate function but I did not understand it.
How can I solve this?
Thanks in advance.
Answers
Of course this means that the filter on year must filter ONLY 1 VALUE otherwise you will have an error anyway.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
But I understood how the evaluate function works and solved the problem.
It works like this:
The result of the getfilter function is contained in the code data type variable "VarYear", although the "year" field is an integer.
"MyVar" is an integer data type variable.
Then, the evaluate function places the value of the "VarYear" variable in the "MyVar" variable, transforming the value of the code data type variable "VarYear" into an integer value in the "MyVar" variable.
Making it possible to add 1 to "MyVar" value.
I think this is it.
Thank you.
(Like kriki was saying, the filter on year could have a range: '01/01/08..02/02/08' and would throw an error on your evaluate)
Yes, I got that after posting my reply, that is not lots of records, but more than one value for that filter.
That error trap is it still necessary if the one data item's ReqFilterFields is that year field? I mean if we don't filled it in the report won't run, or it won't do anything. I'm just correcting this report, and I could change it to include this error trap, but I ended up using a variable being evaluated in another situation.
RIS Plus, LLC