Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Conditional Formatting on a cross-tab summary Post Reply Post New Topic
Author Message
BSpears
Newbie
Newbie
Avatar

Joined: 08 Jun 2011
Location: United States
Online Status: Offline
Posts: 2
Quote BSpears Replybullet Topic: Conditional Formatting on a cross-tab summary
     Posted: 08 Jun 2011 at 11:03am
Long time listener, first time caller.

I have a cross-tab report that has field I would like to conditionally format. 
I would like to compare an individuals loss ratio to the overall company average +/- 5 points.

I have put together the following formula...

if Sum ({AGENT.LossRatio}, {AGENT.AgencyNo}) >= Sum ({AGENT.Company_Average}, {AGENT.AgencyNo}) + 5 then crRed else
if Sum ({AGENT.LossRatio}, {AGENT.AgencyNo}) <= Sum ({AGENT.Company_Average}, {AGENT.AgencyNo}) - 5 then crGreen else crBlack

The formula turns all the amounts either red or greed based on if they are higher or lower than the company average, it DOES NOT recognize the +/- 5 points.

What am I missing?

IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 08 Jun 2011 at 11:19am
Are you getting a syntax error when you check the formula? It seems to me you need a  )  after the 5's.
IP IP Logged
BSpears
Newbie
Newbie
Avatar

Joined: 08 Jun 2011
Location: United States
Online Status: Offline
Posts: 2
Quote BSpears Replybullet Posted: 09 Jun 2011 at 4:44am
Nope, no syntax errors.  I have tried it with the parenthesis since and it didn't change the results. 

Upon closer inspection it looks like the results I am seeing on the report are wholesale.  The values for each cross-tab are getting either a red or a green value based on one comparison instead of a evaluation for each record.  The report  has 4 groups

AgencyName
  DataType
     AgencyNo
         LOB

The cross tab is in the AgencyNo footer, the data is already summarized at the detail level. 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum