2012-08-03 39 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