zondag 13 oktober 2013

Crystal Reports: Graph with Different Colors Below and Above Norm

A graph in Crystal Reports with different colors when the revenue values are above the norm or when they are below the norm.

The graph is based on the tables Orders and Order_Details from the database Northwind.

  • Formula Field Revenue:
  • Group on Orders.OrderDate per Month.
  • Summary on Formula Field Revenue for the created group.
  • Formula Field RevenueAbove:

if Sum ({@revenue}, {Orders.OrderDate}, "monthly")> {?prmNorm} then
    Sum ({@revenue}, {Orders.OrderDate}, "monthly")
  • Formula Field RevenueBelow:
if Sum ({@revenue}, {Orders.OrderDate}, "monthly")<= {?prmNorm} then
    Sum ({@revenue}, {Orders.OrderDate}, "monthly")
  • Parameter Norm, type Numeric.
  • Formula Field Norm:
  • Created a Line Chart with the data:

  • Changed the lines for revenueabove and revenuebelow into Risers.
  • Picked nice colors.
You can dowload the file here: www.walmar.nl/zips/graphbelowabove.zip

You can also download the file through this link:


Geen opmerkingen: