none
Change the font name in vfp9 report

    Question

  • Hi experts

    I want to change the font name during the run time of vpf9 report for specific field name

    thanks in advance

    jasvee

    Saturday, April 09, 2011 8:38 AM

Answers

  • Do you mean during the report run or before the report run? You may do both.

    To change the font during the report run you have to define Dynamic filed property - double click the field and go to the Dynamics tab, then add new condition and select the font which should be used when your condition is evaluated to .T. You will need REPORTBEHAVIOR 90 for this feature.

    To change the font before the report run you may open the FRX file as a table in your app and replace the Fontface, Fontstyle, Fontsize fields by appropriate values for given report output field. Newly used fonts should probably be known for the report, so they should be defined in FRX records having Objtype = 23.

    Direct update of FRX file is not a trivial task and you should test it carefully during the development. I would also recommend to read the chapter 11 of the http://www.hentzenwerke.com/catalog/vfprw.htm before you start.

     

    • Proposed as answer by Tom BorgmannEditor Tuesday, April 12, 2011 9:36 AM
    • Marked as answer by jasvee Wednesday, April 13, 2011 12:39 PM
    Saturday, April 09, 2011 9:58 AM

All replies

  • Do you mean during the report run or before the report run? You may do both.

    To change the font during the report run you have to define Dynamic filed property - double click the field and go to the Dynamics tab, then add new condition and select the font which should be used when your condition is evaluated to .T. You will need REPORTBEHAVIOR 90 for this feature.

    To change the font before the report run you may open the FRX file as a table in your app and replace the Fontface, Fontstyle, Fontsize fields by appropriate values for given report output field. Newly used fonts should probably be known for the report, so they should be defined in FRX records having Objtype = 23.

    Direct update of FRX file is not a trivial task and you should test it carefully during the development. I would also recommend to read the chapter 11 of the http://www.hentzenwerke.com/catalog/vfprw.htm before you start.

     

    • Proposed as answer by Tom BorgmannEditor Tuesday, April 12, 2011 9:36 AM
    • Marked as answer by jasvee Wednesday, April 13, 2011 12:39 PM
    Saturday, April 09, 2011 9:58 AM
  • Beaware that it can change the report in undesired ways. Just because two fonts use the same point size, doesn't mean they're completely repalceable with each other. If one font is wider than another, it can cause the field to overflow and not display or be cut off.
    Craig Berntson
    MCSD, Visual C# MVP
    INETA Community Speaker
    www.craigberntson.com
    Saturday, April 09, 2011 2:16 PM