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

subtraction in crystal

Status
Not open for further replies.

mattsuppok

Instructor
Jan 28, 2003
14
US
Creating a report with values grouped by a field. The group is then summarized. There are only 2 values that will be grouped... What I want to do is instead of a grand total showing in the report footer, I want the difference between the 2 groups to show.

Example

Inlet total 500
outlet total 400

loss 100

"Inlet" is one of my group names, "outlet" is the other. outlet and inlet are 2 values in the same field. Can you do subtraction instead of a sum???..thanks
 
Hi,
Create a formula to do the subtration and place it in the Report footer..

[profile]
 
can't just put in formula. "inlet" and "outlet" are names I have given to the same group to get the order that I wanted the group sorted into. How would you take that same group and instead of summing, subtract?
 
You can do a Running Total that adds just once per group, or adds conditional on a formula. Does that help?

As Turkbear says, subtraction as such is only possible in formula fields or variables, using values that have been accumlated elsewhere.

It helps to give your Crystal version, since newer versions have extra options, and some extra problems. I use Crystal 8.5.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
You need to use two running totals. In the first ({#Inlet}, choose {table.amt}, sum, and then set the evaluation section to "evaluate using a formula" and then enter:

{table.groupfield} = "Inlet"

Reset never. For the second ({#Outlet}, just change the formula to "Outlet."

Then create a formula:

{#Inlet} - {#Outlet}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top