freeflight123
asked on
change color of details row
Hi,
how can I change the color of a details row, e.g. if
table.created=NOW() then the whole row should turn into red
how can I change the color of a details row, e.g. if
table.created=NOW() then the whole row should turn into red
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I concur with mlmcc, but because of a Crystal "quirk" be sure to add an "else" to this particular formula (or the entire background will black out, so:
v8 or higher
If ({table.created} = CurrentTime()) then
red else defaultattribute
v7
If ({table.created} = Currentdate()) then
red else white
(or I think v7 included "nocolor" also)
v8 or higher
If ({table.created} = CurrentTime()) then
red else defaultattribute
v7
If ({table.created} = Currentdate()) then
red else white
(or I think v7 included "nocolor" also)
Hi.
Depends what you mean in "turning red":
- if changing background for detail section see mlmcc's comment above
- if changing background for part of the section see my comment at https://www.experts-exchange.com/questions/20723536/Formating-Issue.html
- if changing font (but not background): create a formula that returns color and use the formula in Format/Font?Color for each field in the detail section.
By the way, Now and CurrentTime are identical, but Now is provided for backward compatibility. Better use CurrentTime.
Also, I doubt that timestamp when you're running a report could be equal to any timestamp in the database. But it depends of the task too...
Good Luck.
PW
Depends what you mean in "turning red":
- if changing background for detail section see mlmcc's comment above
- if changing background for part of the section see my comment at https://www.experts-exchange.com/questions/20723536/Formating-Issue.html
- if changing font (but not background): create a formula that returns color and use the formula in Format/Font?Color for each field in the detail section.
By the way, Now and CurrentTime are identical, but Now is provided for backward compatibility. Better use CurrentTime.
Also, I doubt that timestamp when you're running a report could be equal to any timestamp in the database. But it depends of the task too...
Good Luck.
PW
Thanks Pat. Didn't know that since I haven't used that feature much. I believe I used in a couple of reports so I'll verify you are correct.
mlmcc
mlmcc
ASKER
thanks guys, works!
how can I have it in e.g. #FFCCCC instead of red?
how can I have it in e.g. #FFCCCC instead of red?
Hi.
Sure, you can. Use Color(r,g,b), where r,g,b are bytes. As well you can create a function that converts hex values to bytes. :-)
Good Luck.
PW
Sure, you can. Use Color(r,g,b), where r,g,b are bytes. As well you can create a function that converts hex values to bytes. :-)
Good Luck.
PW
Glad I could help
mlmcc
mlmcc
mlmcc