Print Page | Close Window

Select last record date from a table

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Writing Code
Forum Discription: .NET 2003 programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=12441
Printed Date: 26 May 2024 at 3:49pm


Topic: Select last record date from a table
Posted By: LarryC
Subject: Select last record date from a table
Date Posted: 25 Feb 2011 at 2:40pm
Hello I'm new to this forum so not sure how this will turn out. I'm in Property Management and I have a property table that has the following fields:
 
Property #/Unit#/ Unit Sq Footage / AS of Date
 
I am trying to write a Crystal Report that would show the last unit sq footage in the database but am having trouble. I am able to do this in Access by grouping the data and using the "Last" criteria but can't find the right function in Crystal.
 
Here's a sample of the data: Table Name is Property_Unit_Sqft
 
1109-4224-2000-6/9/2009
1109-4224-2250-7/1/2009
1109-4224-2200-12/31/2009
1110-0110-1500-1/1/2009
1112-0220-1000-1/31/2009
 
I would like the report to show the lastest square footage for Unit 4224 of 2200 but I'm getting all 3.
 
Hope some one can help me.
 
Thanks



Replies:
Posted By: hilfy
Date Posted: 03 Mar 2011 at 4:00am
Group by property, sort by date descending.  Put your fields in the property group header section.  Suppress the details.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window