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
- Create two bitmaps. One bitmap represents the box checked while
the other one represents the box unchecked.
- To display a bitmap, select the Picture/OLE Bound Control from the
Report Controls toolbox, and place the image on your report.
- 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.
- 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.
- 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(<logical expression>,'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:
ARTICLE-ID: Q114135
TITLE : How to Print Check boxes Instead of Y/N in FoxPro Reports
|