如何获取Crystal Reports中记录的交替背景颜色 [英] How to get alternating background colour for records in Crystal Reports

查看:262
本文介绍了如何获取Crystal Reports中记录的交替背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以灰色和白色等交替颜色显示记录。但是,我抑制了一些记录,例如抑制白色背景记录,然后下一个记录是灰色的,所以我最终得到灰色的两个记录。

I am displaying records in alternating colour like grey and white. But, I am suppressing some records, for example suppressing a white background record and then the next record is gray so I end up getting gray colour for two records.

下面是

iif (RecordNumber mod 2 = 1, crwhite, rgb(214,214,214))

即使在抑制了一些记录之后,有办法获得交替颜色吗?

Is there a way to get alternating colours even after suppressing some records?

推荐答案

假设公式{@SuppressSection?}保存您的抑制逻辑,我建议使用以下颜色公式:

Assuming the formula {@SuppressSection?} holds your suppression logic, I would suggest using the following color formula:

booleanvar alternate;
if not({@SuppressSection?}) then alternate:=not(alternate);
if alternate then crWhite else color(214,214,214) 

这将忽略抑制的部分,显示记录的颜色。

This will ignore suppressed sections and only alternate the color for displayed records.

这篇关于如何获取Crystal Reports中记录的交替背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆