I am receiving a color formatting error when trying to run a Crystal Report in Personify

23 Views Asked by At

Below is the the error message:

`The viewer could not process an event. Error in File MTG9008:
 Error in formula Section_Back_Color:
'// This conditional formatting formula must return one of the following Color Constants:
'
This field name is not known.
Details: errorKind []
---- Error code:0 [CRWEB00000119]`

And here is the formula that determines the alternating background color in the Detail section:

`// This conditional formatting formula must return one of the following Color Constants:
// 
// Color (red, green, blue)
// crBlack
// crMaroon
// crGreen
// crOlive
// crNavy
// crPurple
// crTeal
// crSilver
// crRed
// crLime
// crYellow
// crBlue
// crFuchsia
// crAqua
// crWhite
// crNoColor
// 
if recordnumber mod 2 = 0 then color(229, 229, 229) else crNoColor`

I tried changing the color to conform to one on the list. I have also searched through the report fields but I do not see a Section_Back_Color field name.

3

There are 3 best solutions below

1
MilletSoftware On BEST ANSWER

In that case, the problem is probably related to the software (Personify?) you are using. Contact tech support for that software.

Or perhaps try to remove the comments area from the expression.

1
MilletSoftware On

Get rid of the ' character at the end of in crNoColor` So the expression should be:

if recordnumber mod 2 = 0 then color(229, 229, 229) else crNoColor
0
MilletSoftware On

Perhaps the Crystal runtime used by Personify doesn't support the color() function. Try RGB() instead:

if recordnumber mod 2 = 0 then RGB(229, 229, 229) else crNoColor

And if that still fails, confirm the issue using:

if recordnumber mod 2 = 0 then crSilver else crNoColor