Calculating a discount in Crystal Formula

Posted on 2015-01-20
Last Modified: 2015-01-20
I have a price field that I want to use minus a discount

{PRICING.BVRTLPRICE01} - {?Discount %}

{?Discount %} is my parameter which can be from 1-100

This is what I need
If {PRICING.BVRTLPRICE01} = 0.00 then 0.00 else {PRICING.BVRTLPRICE01} - {?Discount %}
Question by:Gerhardpet
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
  • 2
  • 2
LVL 23

Expert Comment

by:Ido Millet
ID: 40560292
{PRICING.BVRTLPRICE01} * (1 - {?Discount %})

Author Comment

ID: 40560367
The formula does not work.

Here is a sample I did
60 * (1-50) = 2940 but that should be 30

60 - 50% = 30
LVL 23

Accepted Solution

Ido Millet earned 500 total points
ID: 40560418
That means the % is not stored as %.

So use
{PRICING.BVRTLPRICE01} * (1 - {?Discount %}/100)

Author Comment

ID: 40560452
That worked. Thanks Ido!

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

705 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