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!

Extremely basic qustion about adding 1

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
US
I havent used Crystal in many many years, i am using crystal 2008 and simply need to add two fields from the same table together to get a total of those fields.

In the formula editor I have tried many ways to accomplish this and get nothing but errors.

If i have a field called "Incoming_Calls" and a field called "Outgoing_Calls what is the proper syntax to use in the formula editor to get the total of those two fields?

Any help is greatly appreciated!

Thanks in advance!!!

Paul
 
If value exist in bothe field for the records you are looking at it should be {Incoming_Calls}+{Outgoing_Calls}

Post the error you are receiving and im sure someone can help from that.
is it a null error message?

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Hi,
Be sure the fields are numeric and not strings, otherwise your formula will concatenate and not add.

So if the fields are character and not numeric and they have '2' and '5', your formula will produce '25' not the 7 that numeric ones would produce.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thank you both for your posts. Cospringsguy, that is exactly what i thought would work and thats what i tried.

When i try:

{Incoming_Calls}+{Outgoing_Calls} i get the following error:

"The Result of Selection Formula Must be a Boolean"

If i try and use the "sum" function using the following:

sum({incoming_calls}+{outgoing_calls}) I get the following error:

"There must be a group that matches this field"

Turkbear, my fields are numeric.

Any help or suggestions you can give to help is much appreciated.

Thanks again,

Paul
 
You are creating the formula in the wrong place. You need to create the formula in the field explorer->formula->new:

{Incoming_Calls}+{Outgoing_Calls}

-LB
 
lbass, thank you SO much! You have cured HOURS of frustration!!!!!! that worked perfectly! Can you possibly explain what the difference in the two places are? Either way thanks a million!

Paul
 
It sounds like you were trying to create this formula in the record selection area--which should only be used to establish criteria for what records should be brought into the report. The field explorer formula and other areas are for working with records already brought into the report by record selection.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top