Crystal Report How to Multiply a negative percent

Posted on 2009-04-03
Last Modified: 2012-05-06
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???




Question by:bjennings
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
  • Learn & ask questions
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}))
LVL 101

Expert Comment

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


Author Closing Comment

ID: 31566360
Pefect!  Thanks!

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL ( and MongoDB (…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

734 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