title: How to calculate [Remaining Amount] in Dynamics Nav report?
body: <p>How to calculate <strong><code>[Remaining Amount]</code></strong> in Dynamics Nav report:</p>
  
  <pre><code>Receivables / Customers / Costomer No. / List of Ledger Entries
  </code></pre>
  
  <p>I reach NAV by SQL only. Which table, and column names should I take the data from? </p>
  
  <p><strong>Update</strong>. My guess of direction is that from the table <code>[Cust_ Ledger Entry]</code> I have to take <code>[Open]=1</code> and from the table <code>[Detailed Cust_ Ledg_ Entry]</code> I have to take the filed <code>[Amount]</code>.</p>
  
  <p>This is additional question. How to do calculate <code>Remaining Amount</code> for a given date of the past. I assume for the present it is easier. </p>