in the functions lookup box there are position and distance functions. You need to specify the units to convert to whatever DR uses for positioning TWIPS maybe( 1/1440 of an inch?)
so

Code:
 
if {COMPANIA.ECTACXCMOSTRARTIQFISCAL}='S' then
	return  UnitCm(5)
else
	return UnitCm(8.5979)
end