Crystal XI
I have a report that displays Meters (D0 section of XML) and the Accounts (D1 sections) associated with them.
The users have the option of selecting a date range in order to display only those Accounts that fall within the date range. This, however, does not affect the XML. The date range suppressions have to happen within Crystal. A meter may have multiple accounts associated with it and an account may be associated to multiple meters, so the XML may look like this:
<D0>
<Meter>000001</Meter>
<D1>
<Account>100000</Account>
<Date>122505</Date>
<Deposit>100.00</Deposit>
</D1>
<D1>
<Account>200000</Account>
<Date>122508</Date>
<Deposit>100.00</Deposit>
</D1>
</D0>
<D0>
<Meter>000002</Meter>
<D1>
<Account>300000</Account>
<Date>122507</Date>
<Deposit>100.00</Deposit>
</D1>
<D1>
<Account>200000</Account>
<Date>122508</Date>
<Deposit>100.00</Deposit>
</D1>
</D0>
If the user chooses to print only those accounts that have a date of 122508 then Account 200000 displays for each meter, according to the sample data above. The second meter will be displayed under the first meter with the same account and date and deposit.
What I need to do is total the deposit amount for the group that contains these records, but since account 200000 displays on top of itself for a different meter, I do not want to include the second amount. So if it was only these two records, I would want the Total Deposit Amount to be 100.00 not 200.00.
Well, I can't do a manual running total that skips the amount if Account=previous(Account) because Account 300000 would be the previous account to the second instance of Account 200000.
I know this seems complex, so any help would be greatly appreciated.
Thanks!