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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing font attributes in a report

Status
Not open for further replies.

lencarne

Programmer
Feb 1, 2003
11
0
0
GB
I want to change a font attribute, say, color of a field in a report depending on its value. This is easy in a form with objectPal but how do you do it in a report?

Regards,

Len Carne
 
I've never done this, but I'm betting that you would have to 'open' the report in design mode and hide it (using obJectPAL), then reference the field directly to change it's color, then 'print' it. I'll look into it a little further.

Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Okay this worked for me. I changed the font color of the field named temp on the Events report and printed it. This is off the cuff, and it does not change the original unles you tell it to save. You have to use RSL reports (not delivered). Unfortunately, this only works for single records (i.e. the font stays changed for all records on that report).

; you would have code to check your values in the answer table and determine if you need to change a font.

var
stockRep Report
endVar

stockRep.open("Events",WinStyleHidden)
stockRep.attach("Events")
stockRep.design()
stockRep.temp.font.color = "Red"
stockRep.run()
stockRep.print()
stockRep.close()



Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top