How do I calculate negative formula using crystal reports?

How do I calculate negative formula using crystal reports?
lolex2788Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
What do you mean?

What is the formula?

mlmcc
0
lolex2788Author Commented:
I have one column of data with positive and negative numbers. I'd like to calcualte them separately using crystal reports.
0
lolex2788Author Commented:
I'm using one table called drowtran, and MY CODE LOOKS LIKE THIS

{DROWTRAN.td_am_code} = "SR" and
{DROWTRAN.td_amount} >  0.00 and
{DROWTRAN.td_am_code} = "SR" and
{DROWTRAN.td_amount} < 0.00
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

mlmccCommented:
You can use a formula like this for the positive values

If ({DROWTRAN.td_amount} >  0.00) then
    {DROWTRAN.td_amount}
else
     0

ANd this for the negative ones.
If ({DROWTRAN.td_amount} <  0.00) then
    {DROWTRAN.td_amount}
else
     0

You can then calculate them separately.

mlmcc
0
lolex2788Author Commented:
I just want to sum all negative numbers and all positive numbers using one field.
0
mlmccCommented:
That is the way you do it.  There is no summary capable of choosing just the positive values and then the negative ones.

You could group based on a formula like

If {YourField} > 0 then
    1
else
    -1

You could then use a group summary

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB Reporting Tools

From novice to tech pro — start learning today.