Print Numbers in Diff Colors

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
a_rosenbaum_(Guest)
Posts: 26
Joined: Tue Oct 10, 2017 12:44 pm

Print Numbers in Diff Colors

Post by a_rosenbaum_(Guest) » Thu Jan 04, 2007 6:37 pm

Is there a way to print a positive number and a negative number in a defferent color in the same calculated field?

Alan_Klein
Posts: 68
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Print Numbers in Diff Colors

Post by Alan_Klein » Fri Jan 05, 2007 9:50 am

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.

a_rosenbaum_(Guest)
Posts: 26
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Print Numbers in Diff Colors

Post by a_rosenbaum_(Guest) » Fri Jan 05, 2007 3:42 pm

thank you your idea worked

Post Reply