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

Setting An ascending order 1

Status
Not open for further replies.

crzycrystlgrl

Technical User
Nov 6, 2004
20
US
OK, CR9 + foxpro....
am trying to come up with a formula which will set an order to the number of exams a patient had been charged for.
So if I had a patient who had three exams (of which all have unique transaction ids) I need to find a way to label the first exam "1" the second one "2"...etc.
The only thought I have seems far too complicated and there has to be an easier answer...
Any ideas?
-Cynthia
 
Group by patient and then sort ascending by the date field. You can then insert a running total using the expert where you count {table.patientID}, evaluate for each record, reset on change of group (Patient). If there is more than one record per test, then in the evaluation section, have it evaluate on change of {table.testID}. Put the running total in the detail section to show a running count of test per patient.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top