2012-08-03 42 views
0

我想看看是否有可以检查某个字符结构字符串中的字段类型 我需要检查是否匹配,并用它来把正在使用的公式红色如果不匹配。水晶报表公式检查字符结构相匹配

ALPHA ALPAH NUM NUM NUM ALPHA

AA123A - 好吧,
A1234A - 变成红色。

在此先感谢。

回答

1

尝试使用这样的作为一个条件格式公式:

local stringvar somefield:={table.string_field}; 

if len(somefield)=7 
    and ascw(somefield[1]) in [65 to 90] 
    and ascw(somefield[2]) in [65 to 90] 
    and isnumeric(somefield[3 to 5]) 
    and ascw(somefield[6]) in [65 to 90] then crBlack else crRed

显然,对于大写字母字符这仅适用(ASCII值65-90)按原样,但可以很容易地改变,以适应无论你需要什么。

+0

谢谢,我会试试看 – Dagz200 2012-08-03 17:36:00