You need to use a SQL expressions to execute SQL commands rather than formulas. Formulas are used for manipulating the data returned by your datasource.
Of course you could set your datasource to be the ramair table and place:
{ramair.diametroramal|='1' and {ramair.diametrocabezal}='1'
in your select expert
and place the valor field on the report canvas
Hope this helps
L