<div dir="ltr"><div>Should seem simple but let me explain...</div><div> </div><div>We have a master database that has over 1 million records in it...</div><div>Here&#39;s how we assign &#39;account numbers&#39; to them.</div>
<div> </div><div>Every account has 3 account number segments...</div><div>Field 1 = Client Number</div><div>Field 2 = Record Number from that client</div><div>Field 3 = Those two fields concatenated together with a &quot;-&quot; in between</div>
<div> </div><div>Some records will only have 1 person associated with it</div><div>i.e.  1234-0001  John Smith   Balance  150.00</div><div>So, field 1 = 1234</div><div>Field 2 = 0001</div><div>Field 3 = 1234-0001</div><div>
 </div><div>Some records will have multiple people associated with it</div><div>i.e. 1234-0002-1  John Smith   Balance  200.00</div><div>      1234-0002-2  Mary Smith   Balance 200.00</div><div>      1234-0002-3  Billy Smith    Balance       .00  (paid their portion)</div>
<div> </div><div>In each case, each one of those should ONLY count as &#39;1&#39; record</div><div> </div><div>What I&#39;m trying to do is get a count for all records, soley based on first 9 digits </div><div>So, if I run processing for client 1234, using the above example, it should show me I have 2 records (1234-0001 and 1234-0002, regardless that 1234-0002 has -1 -2 and -3 associated with it.</div>
<div>Each of these will also have a balance associated with them.  I&#39;m only wanting to pickup the balance &#39;once&#39; for each of these records, even if one of the &#39;-1, -2&#39; etc has a zero balance.</div><div>
 </div><div>So, the end result if I was to run a summary for client 1234, using the above example, I want to get totals of:         Total Accounts: 2      Total Balance:  350.00  (150.00 for 1234-0001 and 200.00 for all the 1234-0002&#39;s)</div>
<div> </div><div>I want a summary report that will give me these totals by all clients, entering a client range.</div><div>So far, I have this:</div><div> </div><div>Placesum (output processing)</div><div>This seems to drop the first record of each client?</div>
<div>aa is total original balance, ab is total paid, ac is current balance</div><div>Remeber field 2 is the -0001, -0002, etc which I set to qz</div><div>Field 1 is 1234 (clt number) which I set to qq</div><div>Line 7 below just grabs the client name etc out of the client file and isn&#39;t doing any</div>
<div>calculation....I guess I have something wrong with the first 3 lines?</div><div>Any thoughts on this?  Hope I explained this well</div><div> </div><div> </div><div>    1  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>
gotit  ■ If: 2 =qz                                                             ■<br>       Then: aa(8,.2)=&quot;&quot;;ab(8,.2)=&quot;&quot;;ac(8,.2)=&quot;&quot;                               ■<br>  2  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>
       ■ If: 2 ne qz                                                           ■<br>       Then: aa=20;ab=21;ac=22;ad(7,.0)=ad+&quot;1&quot;                                 ■<br>  3  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>
       ■ If:                                                                   ■<br>       Then: qq(4,#,g)=1;qz(4,#,g)=2                                           ■<br>  4  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>
       ■ If:                                                                   ■<br>       Then: end                                                               ■<br>  5  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>
@wbrk1 ■ If:                                                                   ■<br>       Then: lookup cln = client  k=1    i=a -nx                             ■<br>  6  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>
       ■ If: not cln                                                           ■<br>       Then: ha=&quot;Client Not Found&quot;;                                            ■</div><div> </div><div>  7  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>
       ■ If: cln                                                               ■<br>       Then: ha(30,*,g)=cln(2);hb=cln(4);hc=cln(5);hd=cln(6);he=cln(7);hi=cln(8)<br>  8  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>
       ■ If:                                                                   ■<br>       Then: end                                                               ■</div><div> </div><div> </div><div> </div><div> </div></div>