Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different Colors in Report Fields?

Status
Not open for further replies.

buddyrich2

Technical User
Apr 12, 2006
87
US
When printing a VFP report, does anyone know if it is possible to print some fields a different color depending on the value of other fields in the table record?

If so, can you tell me how to do it?

Thanks in advance.
 
It has been years since I have done it, but yes it is possible. The trick (if I recall right) is to to have multiple report fields, one on top of each other. Each field is a formated as a different color and you set that field only print under the proper condition, all of the other fields should be suppressed.

I did this for a report with 6+ colors 9 point fonts and ~50 field groups, each 1-2 characters wide. OH was it a pain to work with. e.g. if a mistake was made on the 5'th in depth field one had to carefully move the 4 on top to get to the fifth. Large screens ( 19" CRTs at the time ) and software based mangnifiers helped a little.

Lion Crest Software Services
Anthony L. Testi
President
 
I would do what MrDataGuy suggests - although I'm sure that VFP9 will have had better ways to do it for YEARS, but that I haven't looked for!


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
In VFP 9.0, you could do it with a modified report listener class, but it would involve a learning curve if you've never done that sort of thing before.

I'd go with Anthony's suggestion. It's true that it's a bit of a pain, but at least the method is obvious.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
In VFP SP2, this kind of thing is a piece of cake. There's a new Dynamics tab in the Field Properties dialog that lets you add as many conditions as you want to an expression and set formatting for each one.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top