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!

Grouping by Ascending Order

Status
Not open for further replies.

cowens

Programmer
Oct 3, 2002
3
US
Is there a way to have a numeric field and sort it in Ascending Order and force the ones that are NULL down to the bottom of the list without using specified order?
 
Assuming a character field, create a formula such as:
-----------------------------------------------------
IF IsNull({my_field}) THEN "ZZZZZZZZ" ELSE {my_field}
-----------------------------------------------------

Sort on that formula instead of on the field, but display the field.

hth,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
It is a numeric field!!
Ranging between 1 and ???
The ones that have nothing in it I want to be and the very end.
 
You might try using IdoMillet's suggested formula except set the null field values to a very large numeric. You could then sort on the formula field and, if desired, suppress those records with the assigned large number.

Even simpler, you could try suppressing records where the numeric field is null.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top