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

Show number as positive however the number is subtracted in the total?

Status
Not open for further replies.

Zthomas

IS-IT--Management
Feb 7, 2006
9
US
Hi

I am using crystal report 10
and I am trying to show a number as positive but have it be subtracted in the total?

 
In the total of what?

You can create a formula to use in lieu of the field for display purposes, such as:

abs({table.field})

Now all values will display as positive, and then use the real {table.field} in the summary operation.

-k
 
I should have stated that this assumed that the number is in fact a negative, you didn't bother to state specifics or give examples so we have ot guess.

-k
 
I am trying to put recreate legacy financial reports using crystal.

Noncurrent Asset
Building 1000
Depreciation 250 -->
Total Noncurrent Asset 750

The number for building is actually a summary of alot of buildings and so are the numbers for depreciation. The 250 for depreciation is a positive number on the report but is treated as subtracted when you look at the total.
 
Ahhh, I see, well you haven't really identified how these sums are created, but you ould still use a formula such as:

sum({table.field} - sum({table.field2})

We really need to know what the data looks like, telling us what the output should be doesn't explain how we can get there.

-k
 
Sample Data Source

Entity# Object Amount
1 110 500
1 120 150
2 110 200
2 120 50
3 110 300
3 120 50

object 110 = building
120 = depreciation
 
OK, create 2 formulas:

//building
if {table.object} = 110 then
{table.amount}
else
0

And in the other use:

//depreciation
if {table.object} = 120 then
{table.amount}
else
0

Then in the report footer place a formula of:

sum({@Building}) - sum({@depreciation})

to supply the total.

-k
 
I was able to use the format field and change the property so that only positive number are shown but the intrinsic value can be positive or negative.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top