title: Crystal Report Selection Formula date range query
body: <p>Pls Help.</p>
  
  <p>I have <code>{tbInvoice.trx_date} and {tbInvoice.payment_date},</code> and i have <code>{?startdate} and {?enddate}</code> parameter in my CR</p>
  
  <p>Case : </p>
  
  <p>Default value for payment_date is NULL when the trx_date is created, Payment_date will be updated as the customer paid.</p>
  
  <p>Question :</p>
  
  <p>I have to filter only record on April.
  How do i filter {tbInvoice.payment_date} is NULL in April and also {tbInvoice.payment_date} is NOT NULL but not in April (in May for example).</p>
  
  <p>Thanks in advance....</p>
  
  <p>Edit------------------------------------------------------------------</p>
  
  <pre><code>        if({tbInvoice.trxDate}&gt;={?startdateSub} and {tbInvoice.trxDate}&lt;={?
      enddateSub} and isnull({tbInvoice.payment_date})) 
  then true 
  else if({tbInvoice.payment_date}&gt;={?enddateSub} and 
      not(isnull({tbInvoice.payment_date})) and {tbInvoice.trxDate}&gt;={?startdateSub} and {tbInvoice.trxDate}&lt;={?enddateSub}) 
  then true 
  else false;
  </code></pre>