Applying Different Font Styles in the Report WriterLast reviewed: April 17, 1995Article ID: Q88444 |
The information in this article applies to:
SUMMARYIn the FoxPro report writer, to apply different font styles to objects that are printed on a non-PostScript printer, you must modify the GEN_PD.PRG and DRIVER.PRG printer drivers and the P_CODES.DBF database file. The text below describes the modifications required. General knowledge about printer drivers and specific knowledge about FoxPro printer drivers is required in order to use the procedures in this article. NOTE: This can also be done by placing the escape sequences (control codes) directly into the report expression. They can be added to the field that is output or placed in a field of their own.
MORE INFORMATIONIn version 2.0 of the FoxPro report writer, the user can assign various font styles to objects using the Style check box in the Report Expression Dialog box. To access the Report Expression dialog box, choose Field from the Report menu. The various font styles are bold, italic, underline, subscript, and superscript. When the user selects a style, the report writer automatically places the associated code in the Code edit control. For example, when the Bold check box is selected, the letter "B" appears in the Code edit control. Alternatively, the user can type "B" in the Code edit control to apply the bold formatting attribute. When the user runs the report, FoxPro sends the style code associated with the object to the PDOBJECT procedure in the DRIVER.PRG file, where it is interpreted for the chosen printer. When the report runs, the control code or escape sequence is sent to the printer to enable the selected font style. While version 2.0 of the FoxPro report writer supports assigning various font styles to objects, it does not support assigning different fonts to various objects. To extend the report writer to support this feature, you must define the style codes for the different fonts that the PDOBJECT procedure can interpret to send appropriate control codes to the printer. The user interface should be the same; to assign a font (Helvetica, Times, New Century Schoolbook, and so on) to an object, the user enters in the Code edit control the style code that corresponds to the font type. The programmer defines the appropriate syntax. For example "F25P12" is an intuitive method for the user to specify a font type and point size. To implement this functionality, do the following:
|
Additional reference words: FoxDos 2.00 pdparms
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |