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

Select recs based on earliest date

Status
Not open for further replies.

gwbiker

MIS
Oct 10, 2002
3
I’m new to CR. I have numerous work order records with same work order number. I am trying to total a field only from the record with the earliest date for a given work order number.

W/O # START-DATE QTY

190 2/19/03 10
190 1/29/03 5
190 1/27/03 6 Want this QTY
201 1/26/03 17 Want this QTY
205 1/28/03 5
205 1/25/03 8 Want this QTY

Is there a way to select only these records or do I need to use variables or a sub-report or something else to get the 3 quantities?

Thanks for any help.
 
Dear GWbiker,

Group on the Work Order Number and Display the information in the Group Header for the Work Order, this will give you the Minimim data which is the first record, conversely if you wanted the Max you would display the footer.

Suppress your Details for Work Order and you will see the falues as thus:

Work Order Date QTY

190 1/27/03 6
201 1/26/03 17
205 1/25/03 8

I hope that helps,

ro

Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Thanks, that helps with the listing! Is there an easy way to only total the QTY for those 3 records. I'd like my total to end up 31 for the example.
 
Dear GWBiker,

Create A Running Total!

Insert/Field Object/Running Total

Field To Summarize : Work Order QTY
Type Summary: Sum

Evaluate: On Change Of Group (Choose the Work Order Number Group!)

Reset: Never

Hope that helpse,
ro


Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Rosemary,
Thank You! Thank You! That works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top