开发者

Crystal Reports Split Function within the Color Function

开发者 https://www.devze.com 2023-04-07 02:55 出处:网络
I have a field in a DB called option1 which holds RGB values like the following; 255.255.5 255.开发者_StackOverflow255.1 etc

I have a field in a DB called option1 which holds RGB values like the following;

255.255.5 255.开发者_StackOverflow255.1 etc

I need my Crystal Report to read this field and change the color of a box. I tried the following;

color (Split({ac.option1}, ".")[1],Split({ac.option1}, ".")[2],Split({ac.option1}, ".")[3])

color (255,255,5) clearly works but this is giving me an error stating a number is required.

Any suggestions would be highly appreciated.

Regards,

Ash


You need to convert the results of the Split() function to numbers:

Color( ToNumber(Split({ac.option1}, ".")[1]), ToNumber(Split({ac.option1}, ".")[2]), ToNumber(Split({ac.option1}, ".")[3]) )
0

精彩评论

暂无评论...
验证码 换一张
取 消