Forum > General

[SOLVED] LazReport change text color according to field value. How to do?

(1/2) > >>

lazguy:
Hello Everybody!!!!!

I tryed without success. So now i need help.

I have a database with a field called oscilation and another field called oscsign which tell me if the oscilation is positive, negative or equal (no oscilation).

I was able to make the report with all columns i need, but i am needing also that the oscilation column in my report is green if the oscsign text field contains '+', red if the oscsign field contains '-' and blue if the oscsign field contains '='.

I don't need to show the oscsign field in the report. It is only a reference field to set the proper color for the oscilation.

Can anyone help me?

Thank you very much in advance.

stonefull:
See the example 'userds' on directory of lazreport

lazguy:
Thank you, stonefull,

but this example changes the background color, not the text color.

I tried canvas.font.color without success.

Anyone knows how can i change the text color?

Thank you very much in advance.

paweld:
hi,
see in my example

best regards
paweld

lazguy:

--- Quote from: paweld on May 25, 2010, 06:33:17 pm ---hi,
see in my example

best regards
paweld

--- End quote ---

Thank you paweld,

But... where is your example?

I read all your posts but i only found canvas.font.color:=clRed;
I already tryed this before but don't work. :-(

Who can help me?

Thank you very much in advance.

Navigation

[0] Message Index

[#] Next page

Go to full version