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

Crystal XI: Need help with formula please

Status
Not open for further replies.

deniscok

Technical User
Jun 25, 2012
8
US
in Crystal reports XI, I am trying to create the following report:

Group by customer

sum revenue for each customer based on an attribute of the order:

if order has attribute 'a' only, if order has attribute 'b' only or if order has
both attributes 'a' & 'b'.

For the customer group level totals I am all set.

I'm having trouble with getting the report totals for the case where the order has both attribute 'a' and 'b' only. No matter what I've tried I keep getting the total for the case where attribute 'a' or 'b' is present, which is essentially all records.
IP IP Logged Edit Post Delete Post
 
You should have created 3 formula

@typea
If orderattribute1 = 'a' then valuefield else 0

@typeb
If orderattribute2 = 'b' then valuefield else 0

@typeab
If orderattribute1 = 'a' and orderattribute2 = 'b' then valuefield else 0

You can then sum these formulae

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top