Doesn't make sense to me.
Allowing for the typo, you have 3 accounts that have the last 5 digits different from the 5 digit account, perhaps what you're trying to say is that you're comparing the last 4 digits of the 12 digit accounts to the last 4 digits?
Taking time to post example dtaa and expected output based on it makes sense.
Since you're even confusing yourself, it stands to reason that you're not getting your requirements across.
Is there a reason why you elect NOT to post example data and the expected results, rather preferring to try to describe requirements?
It's much simpler to give examples.
You can create a formula of right(trim({table.field}),4) to use to group by, if that helps. This assumes that they are the same field, which you still haven't clarified.
Example data would do so. btw, example data doesn't mean your current output format, it means what the data looks like in the table, as in:
acct amount
27405 45.00
212347405 10.00
236987405 15.00
243567505 20.00
Output (using the right 4 characters of the acct field)
For Group 7405
acct amount
27405 45.00
212347405 10.00
236987405 15.00
243567505 20.00
As for not summing 5 digit accts, create a Running Total and in the evaluate->use a formula use:
len(trim({table.acct})) > 5
Your rush to post prevents people from understanding your requirement, please take the time to state specifics if you need additional help.
-k