title: How to add a complex range expression to an AOT query in the AOT
body: <p>I am working on a report, and for my data set i need to use an or statement. in SQL my query would look like:</p>
  
  <p><code>SELECT recId, etc... FROM CustTrans 
  WHERE (CustTrans.Closed IS NULL AND CustTrans.Invoice IS NULL) 
  OR (CustTrans.Invoice IS NOT NULL)</code></p>
  
  <p>I would translate this then into range like the following (stuck on the RecId field)</p>
  
  <p>Value:
  <code>((CustTrans.Invoice == ‘’) &amp;&amp; (CustTrans.Closed == ‘’) || (CustTrans.Invoice != ‘’))</code></p>
  
  <p>I have found numerous places explaining that this is the proper syntax, although all of them are using the programmatic method of creating a query. I need to keep mine in the AOT so the customer can modify it later on if they want, and every combination of quotes, parens, and order still does not work. Sometimes AX will accept my range value string, but it doesn't do anything, and sometimes it will give me a random syntax error.</p>
  
  <p>Is there a way to accomplish what I'm looking to do? have I missed some syntax, or does AX really not let you use OR on a query without a union and another view?</p>
  
  <p>Thanks!</p>