Topic: Data Retrieval help please Posted: 18 Oct 2010 at 6:24am
I am joining two tables.
Customer table has a one to many relationship with Inventory table
I just want to pull back the customer table rows with the most recent row on the inventory table for that customer. There is a date on the inventory table so is it possible to tell crystal reports to just pull back the customer row along with the most recent row on the inventory table?
Joined: 18 Oct 2010
Location: United States
Online Status: Offline
Posts: 4
Posted: 19 Oct 2010 at 4:45am
You will have to go into the Select Expert and create a custom formula that says where [date column] = Max([insert date column here]). The Select Expert is located on the toolbar and looks like a hand pointing to a couple of marbles.
Yeah I understand that but this will just bring back one row as being the max for every report. I want the max date per customer. So if there are ten customers on the report I want the max date for each of their inventory items, so ten dates, not one max date for the whole report.
Joined: 18 Oct 2010
Location: United States
Online Status: Offline
Posts: 4
Posted: 19 Oct 2010 at 5:21am
So add an AND statement which matches the customer names of the max and the other row. Not currently sure about the syntax of that, I'll have to take a peak here a bit later today.
Joined: 18 Oct 2010
Location: United States
Online Status: Offline
Posts: 4
Posted: 19 Oct 2010 at 5:28am
By the "Other Row", all I'm referring to is the row it would be currently getting checked against. I'll look into this and get back to you later today.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum