Solved

# Crystal Report How to Multiply a negative percent

Posted on 2009-04-03
873 Views
Hello Everyone,

I am working on a report and have a formula which will calculate a goal amount.  This is the formula
({#LYSales} + ({#LYSales} * {@goalpercent}))

This works fine, the problem is when @goalpercent is a negative percentage.... it will just calculate it as a positive percentage.
How can I calculate it as a negative percentage???

Thanks,

Bill

Thanks,

Bill
0
Question by:bjennings
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 17

Accepted Solution

MIKE earned 400 total points
ID: 24062341
Try this:

if (({#LYSales} + ({#LYSales} * {@goalpercent}))) <0
then ({#LYSales} + ({#LYSales} * {@goalpercent})) *-1
else ({#LYSales} + ({#LYSales} * {@goalpercent}))
0

LVL 100

Expert Comment

ID: 24062426
How do you know it isn't calculating correctly?

mlmcc
0

Author Closing Comment

ID: 31566360
Pefect!  Thanks!
0

## Featured Post

Question has a verified solution.

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

### Suggested Solutions

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
###### Suggested Courses
Course of the Month7 days, 3 hours left to enroll