Jump to content

This topic is 7286 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I think the TextColor function only changes the color of the text. I would be surprised if it changed the field's background color.

There are some clever but kludgy ways to make the background look like it has changed color by utilizing container fields. I've only done this once before so I'm not the right person to explain it. Do a search on the Forums and I'm certain thay you will find your answer.

Posted

You're right. I misread the question.

Make the fill transparent and then put a container calculation field behind it.

The calculation will be Case( sometest; globalcontainer1; someothertest; globalcontainer2; etc.) GlobalcontainerX can either be one field with multiple repetitions (in which case you would reference it with GetRepetition( globalcontainer; X ) for all repetitions greater than 1) or separate global fields. In Layout Mode, make a box with the desired fill color, then select and copy it, enter Browse Mode, and paste into the appropriate global container field/repetition. Repeat for each color.

Posted

Yes it would! Personally I'd have more use for a function that sets background color than one that sets the text color.

  • 1 month later...
  • 2 months later...
  • Newbies
Posted

I am so glad I looked in this forum to solve my "formating of my fill colour via a script problem" your solution was easy and worked a treat. Thanks a lot for passing on your expert knowledge to novices like me.

  • Newbies
Posted

I am so glad I looked in this forum to solve my "formating of my fill colour via a script problem" your solution was easy and worked a treat. Thanks a lot for passing on your expert knowledge to novices like me.

  • Newbies
Posted

I am so glad I looked in this forum to solve my "formating of my fill colour via a script problem" your solution was easy and worked a treat. Thanks a lot for passing on your expert knowledge to novices like me.

Posted

can I continue with this one? what if I wanted a value that equals the same? I have a calculation field that takes the value of one field and another. What if I wanted that same thing to change color if the value equals the same? Would I have to make a relationship of itself then set the field like:

case(

fielda=1;goBG

)

I know that this won't work because it is only looking at itself and not all records... and, 1 should be a bolean... if it is out of the "" does that make it a bolean?

Posted

can I continue with this one? what if I wanted a value that equals the same? I have a calculation field that takes the value of one field and another. What if I wanted that same thing to change color if the value equals the same? Would I have to make a relationship of itself then set the field like:

case(

fielda=1;goBG

)

I know that this won't work because it is only looking at itself and not all records... and, 1 should be a bolean... if it is out of the "" does that make it a bolean?

Posted

can I continue with this one? what if I wanted a value that equals the same? I have a calculation field that takes the value of one field and another. What if I wanted that same thing to change color if the value equals the same? Would I have to make a relationship of itself then set the field like:

case(

fielda=1;goBG

)

I know that this won't work because it is only looking at itself and not all records... and, 1 should be a bolean... if it is out of the "" does that make it a bolean?

Posted

Do you mean if the value of fieldA equals the value of fieldB, then display a different color? If so, a calc field of Case( fieldA = fieldB; goBG ) should do it.

Case( fieldA = 1; goBG ) would only use goBG when the value of fieldA = 1, which could be a boolean if fieldA only contains 1 or zero, in which case Case( fieldA; goBG ) would also work. If fieldA can contain other numbers, then Case( fieldA; goBG ) would return goBG whenever fieldA did not contain a zero and was not empty.

Posted

Do you mean if the value of fieldA equals the value of fieldB, then display a different color? If so, a calc field of Case( fieldA = fieldB; goBG ) should do it.

Case( fieldA = 1; goBG ) would only use goBG when the value of fieldA = 1, which could be a boolean if fieldA only contains 1 or zero, in which case Case( fieldA; goBG ) would also work. If fieldA can contain other numbers, then Case( fieldA; goBG ) would return goBG whenever fieldA did not contain a zero and was not empty.

Posted

Do you mean if the value of fieldA equals the value of fieldB, then display a different color? If so, a calc field of Case( fieldA = fieldB; goBG ) should do it.

Case( fieldA = 1; goBG ) would only use goBG when the value of fieldA = 1, which could be a boolean if fieldA only contains 1 or zero, in which case Case( fieldA; goBG ) would also work. If fieldA can contain other numbers, then Case( fieldA; goBG ) would return goBG whenever fieldA did not contain a zero and was not empty.

This topic is 7286 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.