SeanJohn
SeanJohn

Reputation: 197

Crystal Report Syntax color font change not working

Can someone help me out why this crystal syntax isn't working on this font change? I Can't figure it out. The data is grouped.

IF {command.section}=3 then crRed else
IF {command.section}=4 and {command.AYB}=1 then CRBlue else
IF {command.section}=4 and {Command.Value}>{Strikezone} then crRed else
IF {command.section}=4 and {Command.Value}<{Strikezone} then crgreen else
CRBlack

Basically the data is in a group. I want section 4 the logic is the issue. If I run it as is anything that has {command.AYB}=1 it changes to blue but it doesn't process the next two lines for red or green. If I comment out the CRBLUE line it processes the red or green.

WHy isn't it working and how do I get it to work for section 4 where if this other value is 1 it will be blue and if not then if it is greater then or less then the strikezone it will be red or green?? I can't get all 3 to work for the {command.section}=3 logic in the syntax.

Upvotes: 2

Views: 845

Answers (1)

SeanJohn
SeanJohn

Reputation: 197

I fixed my own issue but should have give more info. I added:

IF {command.section}=3 then crRed else
IF {command.section}=4 and {Command.Value}>{Strikezone} and {command.AYB}<>1 then crRed else
IF {command.section}=4 and {Command.Value}<{Strikezone} and {command.AYB}<>1 then crGreen else
IF {command.section}=4 and {command.AYB}=1 then crBlue else
crBlack

I added in so it doesn't equal 1 and Also the missing values were NULL so I added in the command so that missing values weren't null they were 0. Field was hidden. Couldve done it another way but I don't think it liked the NULLs very well when looking at those fields.

Upvotes: 0

Related Questions