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

Whileprintingrecords and sorting problem

Status
Not open for further replies.

kbieber

MIS
Aug 14, 2000
118
US
I need to sort a report 2 different ways - by part number and by earliest allocation date. Since a part can have multiple allocations, I'm using the following formula to sort part numbers by earliest allocation date -

whileprintingrecords;
minimum({@AllocStartDate}, {spMatlPriListData.item_no})

Results:

partno earliest date
5 02-04-04
2 02-05-04
12 02-12-04
9 02-15-04

and that works fine. Then I deleted the formula and changed the sort to part number. Problem is, the report detail prints in the same order as above - as if it were still sorting by earliest date - even though the earliest date field (and the formula) has been completely deleted from the report! Can someone explain this? Thanks.

KB
 
1) A single report can't be sorted (or grouped) two different ways at the same time. It can have a primary and secondary sort at the same time, if that is what you mean.
2) The formaula you show can't affect either Grouping or Sorting, because it is calculated after both of those are done. You could, however, use the total represented in this formula as a TopN.
3) I think you are saying sorting when you mean grouping.

It might help to show an example of what your data looks like now, and then show an example of what you want the end result to look like. Your version of CR would also help.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top