0 or arm.peso>0)
group by arm.codigoarma))) a
left join tarmregistroarmas ra on ra.cregistro = a.cregistro
inner join tcustpersondetail pd on pd.personcode = ra.personcode and to_char(pd.dateto,'yyyy-MM-dd')='2999-12-31'
inner join tarmtipoarmaexplosivo tae on a.ctipoarmaexplosivo = tae.ctipoarmaexplosivo
where ra.fechasolicitud between to_date( $P{fechainicial} ,'dd/MM/yyyy') and to_date( $P{fechafinal} ,'dd/MM/yyyy')
$P!{filtro}]]>