title: Override dataview delegate method
body: <p>I wanting to override the details delegate method on PX.Objects.AR.ARStatementPrint graph.</p>
  
  <p>HEre is the method</p>
  
  <pre><code>protected virtual IEnumerable details()
  {
      ARSetup setup = ARSetup.Current;
  
      PrintParameters header = Filter.Current;
      List&lt;DetailsResult&gt; result = new List&lt;DetailsResult&gt;();
      if (header == null)
          yield break;
  
      GL.Company company = PXSelect&lt;GL.Company&gt;.Select(this);
      foreach (PXResult&lt;ARStatement, Customer&gt; it in PXSelectJoin&lt;ARStatement,
              InnerJoin&lt;Customer, On&lt;Customer.bAccountID, Equal&lt;ARStatement.statementCustomerID&gt;&gt;&gt;,
              Where&lt;ARStatement.statementDate, Equal&lt;Required&lt;ARStatement.statementDate&gt;&gt;,
                  And&lt;ARStatement.statementCycleId, Equal&lt;Required&lt;ARStatement.statementCycleId&gt;&gt;&gt;&gt;,
              OrderBy&lt;Asc&lt;ARStatement.statementCustomerID, Asc&lt;ARStatement.curyID&gt;&gt;&gt;&gt;
              .Select(this, header.StatementDate, header.StatementCycleId))
      {
          DetailsResult res = new DetailsResult();
          ARStatement st = it;
          Customer cust = it;
          res.Copy(st, cust);
  
          if (setup?.ConsolidatedStatement != true &amp;&amp; st.BranchID != header.BranchID)
                  continue;
  
          if (Filter.Current.Action == 0 &amp;&amp;
              header.ShowAll != true &amp;&amp;
              (st.DontPrint == true || st.Printed == true))
                  continue;
  
          if ((Filter.Current.Action == 1 || Filter.Current.Action == 2) &amp;&amp;
              header.ShowAll != true &amp;&amp;
              (st.DontEmail == true || st.Emailed == true))
                  continue;
  
          if (cust.PrintCuryStatements == true)
          {
              if (Filter.Current.CuryStatements != true)
                  continue;
  
              DetailsResult last = result.Count &gt; 0 ? result[result.Count - 1] : null;
              if (last?.CustomerID == res.CustomerID &amp;&amp; last?.CuryID == res.CuryID)
              {
                  last.Append(res);
              }
              else
              {
                  result.Add(res);
              }
          }
          else
          {
              if (Filter.Current.CuryStatements == true)
                  continue;
  
              res.ResetToBaseCury(company.BaseCuryID);
  
              DetailsResult last = result.Count &gt; 0 ? result[result.Count - 1] : null;
              if (last?.CustomerID == res.CustomerID)
              {
                  last.Append(res);
              }
              else
              {
                  result.Add(res);
              }
          }
      }
  
      foreach (var item in result)
      {
          var located = Details.Cache.Locate(item);
          if (located != null)
          {
              yield return located;
          }
          else
          {
              Details.Cache.SetStatus(item, PXEntryStatus.Held);
              yield return item;
          }
      }
  
      Details.Cache.IsDirty = false;
  }
  </code></pre>
  
  <p>Im specifically wanting to the change the foreach select statement so it is ordered by another field.</p>
  
  <pre><code>foreach (PXResult&lt;ARStatement, Customer&gt; it in PXSelectJoin&lt;ARStatement,
          InnerJoin&lt;Customer, On&lt;Customer.bAccountID, Equal&lt;ARStatement.statementCustomerID&gt;&gt;&gt;,
          Where&lt;ARStatement.statementDate, Equal&lt;Required&lt;ARStatement.statementDate&gt;&gt;,
              And&lt;ARStatement.statementCycleId, Equal&lt;Required&lt;ARStatement.statementCycleId&gt;&gt;&gt;&gt;,
          OrderBy&lt;Asc&lt;ARStatement.statementCustomerID, Asc&lt;ARStatement.curyID&gt;&gt;&gt;&gt;
          .Select(this, header.StatementDate, header.StatementCycleId))
  {
  </code></pre>
  
  <p>Ive tried<br>
  [PXOverride]</p>
  
  <p>protected virtual IEnumerable details()<br>
  {</p>
  
  <p>But no luck, is it possible to override this method?</p>