Where are you trying to put this formula? It won't work. You need to make formulas like this:
//{@2011tot}:
if {table.date} =2011 then {ORDERHDR.ORDER_TOT}
//{@2012tot}:
if {table.date} =2012 then {ORDERHDR.ORDER_TOT}
Then in the report footer, use:
sum({@2012tot})-sum({@2011tot})
If you are doing this at some group level, you would have to add in a group condition and place in a group header or group footer:
sum({@2012tot},{table.groupfield})-sum({@2011tot},{table.groupfield})
-LB