[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

How do I calculate negative formula using crystal reports?

Posted on 2010-03-30
7
Medium Priority
?
2,009 Views
Last Modified: 2012-05-09
How do I calculate negative formula using crystal reports?
0
Comment
Question by:lolex2788
  • 3
  • 3
6 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 29137868
What do you mean?

What is the formula?

mlmcc
0
 

Author Comment

by:lolex2788
ID: 29138295
I have one column of data with positive and negative numbers. I'd like to calcualte them separately using crystal reports.
0
 

Author Comment

by:lolex2788
ID: 29138521
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
LVL 101

Expert Comment

by:mlmcc
ID: 29139283
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
 

Author Comment

by:lolex2788
ID: 29279246
I just want to sum all negative numbers and all positive numbers using one field.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 29287014
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

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
How to increase the row limit in Jasper Server.
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
The video provides a quick and easy steps to migrate MBOX file to well known Outlook PST and Office 365. Besides this, it also supports and migrates more than 20 email clients of MBOX which include AppleMail, Opera, Thunderbird and SeaMonkey effortl…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question