Microsoft KB Archive/128817

= How to display check boxes in a report =

Article ID: 128817

Article Last Modified on 2/11/2005

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual FoxPro 7.0 Professional Edition
 * Microsoft Visual FoxPro 8.0 Professional Edition
 * Microsoft Visual FoxPro 9.0 Professional Edition

-



This article was previously published under Q128817



SUMMARY
A Visual FoxPro report can print information from fields or variables. It is also possible to print check boxes in a report. This article gives you two methods.



MORE INFORMATION
Check boxes in a report provide a way to easily view logical information such as answers to a survey. The Visual FoxPro Report Designer does not include a check box control. However, you can display a check box by using one of the following two methods.

Method One: Use a Bitmap

 * 1) Create two bitmaps. One bitmap represents the box checked while the other one represents the box unchecked.
 * 2) To display a bitmap, select the Picture/OLE Bound Control from the Report Controls toolbox, and place the image on your report.
 * 3) In the Report Picture Dialog, select the Print When command button. When the Print When dialog is displayed, click the Print Only When Expression is True text box, and type a condition that evaluates to .T. to display the checked check box.
 * 4) Repeat the same process to display the bitmap for the unchecked box. Type a condition that evaluates to .F. in the Print Only When Expression is True text box.
 * 5) Superimpose the two controls. When the report is run, the appropriate bitmap will be displayed.

Method Two: Use an Expression with a Wingdings Font
 Select the Field Control from the Report Controls toolbox.  Type the following line in the expression box dialog, and click OK. IIF( ,'x','o')  While the new field is highlighted in the report, select the Font option from the Format menu. Change the font to Wingdings. When the report is run, the expression will evaluate to a check box.

For information about using these methods with FoxPro version 2.x, please see the following article in the Microsoft Knowledge Base:

114135 How to Print Check boxes Instead of Y/N in FoxPro Reports

Additional query words: VFoxWin

Keywords: KB128817

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.