>Hi,
>
>I need to print different fields on a foxpro report in different colours depending on the value in that field - How can I change the colour/backcolour of a field at runtime?
>
>Thanks for any help.
In VFP8 only one way:
Make a bunch of Fields with the same Expression, change color for each to desired value. In each Field put in Print when: MyField=ValueForThisColor. Adjust the size to be the same for each field and allign Left and Top Sides also to be the same.
I.e.:
Field Expression COLOR Print When Left Top
-------------------------------------------------------------------------------------
1 MyTable.MyField Red MyTable.MyField < 0 10 10
2 MyTable.MyField Green BETWEEN(MyTable.MyField,0,100) 10 10
3 MyTable.MyField Black MyTable.MyField > 100 10 10
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.