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

Group Sorting based on Formula

Status
Not open for further replies.

dev1212

Programmer
May 11, 2010
117
US
Hi,
I have the group field {NewID} which i want to sort on {Name} or {Value}, i believe using Max/Min on this field and using 'ALL' in group sort expert is the way for this. But I need it to be on formula.

For now its for Ascending only,

like,

Formula name is 'SORT'
The contents of formula is,

If
{?Param}='Name'
Then
Max({Name}, {NewID})
Else
Max({Value}, {NewID})


But i cannot see it in group sort expert.
Any solution to this..? or any other approach would be greatly appreciated.


Please reply..

Thanks


 
Why not just group on a formula like this:

If {?Param}='Name' Then
{Name} else
{Value}

-LB
 
I considered that option too but the thing is i've the requirement to group it on {NewID} field but sort on another({Name} or {Value}).
 
In that case, place the formula:

If {?Param}='Name' Then
{Name} else
Value}

...in the details section->right click on it-> and then insert a maximum on it at the NewID group level. Then go to report->group sort and select maximum of NewID as your sort field. Not sure whether it is ascending or descending. Try each.

-LB
 
ok.. i'll try and will let you know.

Thanks for your reply lbass
 
Yes.. it worked..
thanks lbass. as i already said in my threads...
you're genious.. i always count on you..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top