水晶报表交叉报表动态改变颜色
水晶报表把打竖的数据打横输出了 但是要根据一定的条件让某些字段变色,具体是有8个时间 然后跟数据库对比取4个变成红色,其中8个时间依次是表里某日期下Ftime字段的第一个最小 第二个最小.....以此类推。
第一次打卡 第二次打卡 第三次打卡 第四次打卡 第五次打卡 第六次打卡 第七次打卡 第八次打卡
8:54 9:39 13:04 14:22 18:50 .....
有什么办法实现吗,交叉报表里用公式格式化字段颜色,一对比就整列都变红了
if NthSmallest (1, {tim_InOut.FTime})-{tim_StandarInOutStat.FAInTime1}=0 then crred
else if NthSmallest (1, {tim_InOut.FTime})-{tim_StandarInOutStat.FAInTime2}=0then crred
else if NthSmallest (1, {tim_InOut.FTime})-{tim_StandarInOutStat.FAOutTime1}=0 then crred
else if NthSmallest (1, {tim_InOut.FTime})-{tim_StandarInOutStat.FAOutTime2}=0 then crred
else crBlack