Print Numbers in Diff Colors
-
- Posts: 26
- Joined: Tue Oct 10, 2017 12:44 pm
Print Numbers in Diff Colors
Is there a way to print a positive number and a negative number in a defferent color in the same calculated field?
-
- Posts: 68
- Joined: Tue Oct 10, 2017 12:44 pm
=> RE: Print Numbers in Diff Colors
I don^t think there is a way to do it in the same field, but I have often done this with two fields using an IIF to control them so that one equals zero if the calculation is negative and the other equals zero if the calculation is not negative.____For example, the negative one might be:__ IIF(SELL_PRICE-OUR_COST<0, SELL_PRICE-OUR_COST,0)____The other one would reverse that:__ IIF(SELL_PRICE-OUR_COST>=0, SELL_PRICE-OUR_COST,0)____Then, I put the two fields in the report on top of each other and next to a space character. I set them both to Trim Field so they "lock on" to the space (which I would set to right justify since the calculations are numeric.)____Finally, I would set the format of each of the calculated fields so that they don^t print when they equal zero and set the color of the font on the negative one to red.
-
- Posts: 26
- Joined: Tue Oct 10, 2017 12:44 pm
==> RE: Print Numbers in Diff Colors
thank you your idea worked