The information in this article applies to:
- Microsoft FoxPro for Windows, version 2.5
SUMMARY
In FoxPro 2.5 for Windows, you can use the Report Writer to create a
report with every other line highlighted, as shown below.
MORE INFORMATION
The following two methods demonstrate how to create a report like the
one on page U14-39 in the "User's Guide."
Method 1
NOTE: This method should be used on a database with no order set.
- In the Command window, enter:
USE customer.dbf
CREATE REPORT TEST
- From the toolbar in the report, click the rounded rectangle icon
then click and drag in the report screen to draw a rectangle with
rounded corners in the Detail band. Size the rectangle to fit the
field you want highlighted.
- Double-click the rectangle. In the Round Rectangle dialog box,
select the Print When check box.
- In the Print When dialog box, select the "Print only when
expression is true..." check box.
- In the Expression Builder dialog box, enter
(recno()/2)=int(recno()/2)
-or-
recno() % 2 = 0
then click three OK buttons to return to the report window.
- With the rectangle object selected, choose Fill from the Object
menu, and select the desired color.
- From the Object menu, choose Mode, and select Transparent.
- Create a field by clicking the third icon in the toolbar. Place
it on top of the rectangle.
- From the Report menu, choose Page Preview to see the results of
these steps.
Method 2
NOTE: This method can be used on a database based on any index order.
- Follow steps 1-4 in Method 1.
- In step 5 above, replace the expression with the following:
MOD(mycount,2)=0
- From the Report menu, choose Variables, and choose the Add button,
then enter the following information in the Variable Definition
dialog box:
Variable name: mycount
Value to Store: mycount+1
Calculation: None
Initial Value: 0
Reset: End of Report
|