title: Dynamics AX: how to filter a report?
body: <p>I need to add a filter to a report in Dynamics AX 2009. Msdn tell me to filter using <em>Fetch</em> event. So i've added the following code into the fetch.</p>
  
  <p>DateFromDialog and DateToDialog are variable declared into ClassDeclaration.</p>
  
  <pre><code>      qrun = new QueryRun(element);
        _vendInvoiceJour = qrun.get(TableNum(VendInvoiceJour));
        if( _vendInvoiceJour.InvoiceDate &lt;= DateFromDialog.value() ||    _vendInvoiceJour.InvoiceDate  &gt;=DateToDialog.value() ) {
            // Exclude record, don't print it
            return false;
        }
  </code></pre>
  
  <p>Is it correct to return false if the record must not printed ?</p>
  
  <p>Thanks</p>