How to Display Check Boxes in Reports

Last reviewed: April 30, 1996
Article ID: Q128817
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

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

  1. Select the Field Control from the Report Controls toolbox.

  2. Type the following line in the expression box dialog, and click OK.

    IIF(<logical expression>,'x','o')

  3. While the new field is highlighted in the report, select the Font option from the Format menu.

  4. 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:

   ARTICLE-ID: Q114135
   TITLE     : How to Print Check boxes Instead of Y/N in FoxPro Reports


Additional reference words: 3.00 VFoxWin
KBCategory: kbtool
KBSubcategory: FxtoolReportdes


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 30, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.