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

Grroup and Record Sort in Crystal XI

Status
Not open for further replies.

karnd

Programmer
Feb 1, 2003
190
US
Hi ,

I have the scenario-

I have grouped on DeptName field but DeptName field has NULL record also init so it would not be doing of order by NULL first(based on my requirement and it is must at present) but it is going by alphabetically.

How can acheive this.

Please throw some ideas.

Regards,

 
I don't understadn the question. Of cousre nulls are first and then they wold be sorted alphabetically. What is it you want to do instead?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
If you want the null record last, you can create a formula:

if isnull({table.dept}) then "zz" else {table.department}

You can group on this formula instead of on {table.dept}. Then you can remove the group name, and place {table.dept} in the group header. Or, you could create a second formula to place in the group header instead of the groupname:

if isnull({table.dept}) then "No Department Assigned" else {table.dept}

The "No Department Assigned" would appear last because the first formula would be result in the "zz" group instance.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top