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!

Conditional Group Sort

Status
Not open for further replies.

Slingky

IS-IT--Management
Mar 4, 2003
67
CA
I have a report like this

category, item#, qty on hand, unit price, total value

i group on category, then i want to group either by item# asc or total value desc.

i created the summary fields for total value and a group sort on total value desc.

if the user asks via a parameter field "groupBy" value, it's ok...but what i want is to let him sort also by item#

please help
 
A report like this means that you have those fields?

If total value is a field, then create a group on a conditional formulas using it, but we need one for item as well.

Then create a formula for the item# grouping such as:

if {?MyParm} = "Item" then
{table.item}
else
""

If you group on that formula, the group will only change things when the parameter is "Item"

Conversely you can create a formula for the total value as in:

if {?MyParm} = "Total value" then
{table.totalvalue}
else
0

Should work.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top