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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show only Last Release Date of Product

Status
Not open for further replies.
Dec 14, 2003
22
0
0
US
I am using Crystal Reports v9.2 with an Access database and am working on a report showing the last Release_Date of all Part#'s.

Sorted by Part# now shows:
Part # Release_Date

12345 01/01/2003
01/02/2004
03/01/2005
12999 03/02/2002
06/01/2003
06/02/2004
13345 06/15/2003
12/02/2004

I would like the report to show only the Last Release_Date:

Part # Release_Date

12345 03/01/2005
12999 04/02/2002
13345 12/02/2004

The purpose of this is to quickly see that we have not produced Part# 12999 for over a year. I suspect that I should sort by date and show only Distinct Part#'s but do not have enough experience with CR to make this happen.

Once again, I bow to those with more knowledge than I.
Thanks All....
 
Create a group on Part # and then insert a summary item in the group header that reports MAX Release_Date. Supress printing of the Detail section.
 
Since you're using MS Access, I would suggest a Query in Access as the datasource, as in:

select partnumber, max(releasedate)
from table
group by partnumber

You can then use this query as the datasource for your report, and the database will do the work, AND it provides for easier maintenance as well as supplying the data to other applications.

If you want to use Crystal, do as Golom suggests, except place the MAX in the group footer, turn on the Database->Group on Server, suppress the details and don't place any fields in the details, you should be able to get the GROUP BY clause to pass in the sql (check by using Database->Show SQL Query). This will provide for better performance as well.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top