fixing reportxform case query for es compatability