2

有人可以帮我弄清楚为什么这种水晶语法不适用于这种字体更改吗?我想不通。数据被分组。

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

基本上数据在一个组中。我想要第 4 节,逻辑是问题所在。如果我按具有 {command.AYB}=1 的任何内容运行它,它会变为蓝色,但它不会处理红色或绿色的下两行。如果我注释掉 CRBLUE 行,它会处理红色或绿色。

为什么它不起作用,我如何让它在第 4 部分起作用,如果这个其他值为 1,它将是蓝色的,如果不是,那么如果它大于或小于罢工区,它将是红色或绿色?我不能让所有 3 都为语法中的 {command.section}=3 逻辑工作。

4

1 回答 1

0

我解决了自己的问题,但应该提供更多信息。我补充说:

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

我添加了所以它不等于 1 并且缺失的值是 NULL 所以我在命令中添加了这样缺失的值不为空,它们是 0。字段被隐藏了。可以用另一种方式来做,但我认为在查看这些字段时它不太喜欢 NULL。

于 2016-07-25T05:49:35.363 回答