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

Changing fonts within Report Writer Control

Status
Not open for further replies.

1421

Technical User
Feb 24, 2004
69
Hi All!

I am trying to print a line of data & within that line of data change fonts (actually Bold), can this be done? Trying to print something within the line that is being 'trim()ed' & therefore dont want to make it into a seperate control so-that there should not be extra spaces.
Maybe the 'stretch' option may help, but I can't seem to understand how it works. I am using VFP version 9

Thank You
 

Do you mean that you want to embolden part of the string? There's no way to do that with native controls. It's all or nothing. (You could do it by adding a richtext OLE control to the report, but that's complicated.)

Or do you mean that you want to make the entire string bold, but only to do so in certain circumstances? In that case, the simplest option is to place two fields on the report, in the same place. One would be bold and the other normal. You can use the "print when" option to enable the one you want.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I mean 'embolden part of the string'. I might have a solution whereby, I whould 'place two fields on the report, in the same place' and i whould print both fields all the time, field #1=alltrim(fname) and be bold, field #2=space(len(alltrim(fname)))+' xyz etc'. In this case the name whould be bold, while the rest of the sentence regular. The font whould need to be a 'fixed' font. What do you think?
 
Since you're using VFP 9, you may want to check into using GDI Plus and the report listener. You would be able to do what you want.
I can't help much as I haven't done it myself, but I have read an article or two on doing exactly that.



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
1421

As Mike Lewis suggested, you can achieve this by adding a OLE picture control on a report, and if you understand the RTF tags you can do many this. Here is an example of a report that has normal text, italic+bold and superscripted with a strikethru all in onr field of a foxpro report.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top