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!

Is conditional grouping possible?

Status
Not open for further replies.

NipsMG

Programmer
Dec 27, 2000
215
US
Is conditional grouping possible?

Basically, I've got a formula that sets a flag one way or the other.

If the flag is set one way, I want to group by location ONLY. If not, I want to sort by Item, then by location.

The only way I can figure to do this is

Conditional group by Item
Static location group.



Is this possible?

Thanks in advance!
 
A Group is not the same as a SORT, so I'll assume that you mean that there would not be a grouping in one of the instances.

Create this formula to group by:

if {?MyFlag} = "Location" then
{table.location} else
""

Use this field as your sort field:

if {?MyFlag} = "Location" then
""
else
{table.item & " - " & {table.location}

If you meant to use the term Group when you stated Sort, then just alter the first formula to:

if {?MyFlag} = "Location" then
{table.location} else
{table.item & " - " & {table.location}

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top