Page 1 of 1

Returning Highest Value Only

Posted: 21 Apr 2020, 09:43
by shn7shn7
Hi,

I'm an absolute novice on Sage Reporting so hopefully this is a simple question with an equally simple answer.

I have a report that lists the following INVOICE and INVOICE_ITEM* fields. It has a section break on INVOICE.ACCOUNT_REF.

Date Account_Ref Name Addr1 Addr2 Addr3 Addr4 Addr5 Stock Code* Description* Invoice No Quantity


How can I output just the most recent invoice for each Account_Ref (either by INVOICE_DATE or highest INVOICE_NUMBER)? Do I need a filter? If so how should this be formatted?

Re: Returning Highest Value Only

Posted: 21 Apr 2020, 10:06
by brucedenney
The footer of a section happens on the last record of the previous section.

So if you had a group of InvNumber, within the group of Account Ref, When you get to the Account Ref footer, you will be on the Last InvNumber for that Account Ref. (If the group is InvDate, then it would be the last date, but if there were 2 invoices on that day, which one would you want?)

The Details and InvNumber sections are only needed to create the structure, you can hide them.

This is not something I have tried before, so is an interesting idea.

If you have problems, I suggest you attach the report to your reply and I will take a look at it for you.

Not sure what the objective of the report is, there could be much easier ways to achieve similar.better results, could you expand on why you want this and the purpose of it.

Re: Returning Highest Value Only

Posted: 21 Apr 2020, 11:01
by shn7shn7
Excellent. Thank you for the quick and very helpful response.

That gives me exactly what I need.