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!

Group all non zero values 1

Status
Not open for further replies.

manjulam

Programmer
Feb 27, 2002
103
US
I have a report with a field "cost" which can be >= 0. i want all non zero rows to be grouped under the name "paid" and the rest in "free". I created a group with expression "cost>0" but now, each row with a non zero value is a group. That is not what I intended. Any ideas?
 
Go to your "DataSets" window in your toolbar, and right-click your dataset's name to add a new field. Give this field a new name such as "CostType." Make this a calculated field, and in the calculation, enter the following expression:

Code:
=iif(Fields!Cost.Value > 0, "Paid", "Free")

You now have a new field for your report. You can group on this new field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top