Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find a last time something was updated

Status
Not open for further replies.

CIBS

Technical User
Nov 15, 2007
73
0
0
GB
Hi

I am using CR9

I have a date field and a product value field (In the same table) what I want to do is display the value based on the last date the value was entered.

For Example

Product 1598 - 12/05/07 - £3.42
Product 1598 - 12/09/07 - £3.49
Product 1598 - 15/07/08 - £5.42
Product 1598 - 01/04/09 - £6.46

so I want a formula to display

Product 1598 - 01/04/09 - £6.46

also if a product doesn't have a value I want it to display the product with no value.

Any Help Thnks

Kind Regards

Stephen



 
Group by product. Sort by date.

Suppress the detail line. Show the value you want in the footer or header, depending on whether the date is ascending or descening.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I have tried this but doesn't seem to work as I can't use the header as I have in excess of 1000 items that I need to list, So I have tried using group,

Isn't there a formula that can look for either the latest date or the last entry

kind regards

stephen
 
Madawc's solution would work. After grouping by product and sorting descending by date, you would move the fields into the group header and suppress the detail section.

Another approach would be to group on product and then go to report->selection formula->GROUP and entering:

{table.date} = maximum({table.date},{table.product})

If you want to do calculations, you will may need to use running totals, since non-group-selected records would contribute to the more usual inserted summaries.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top