The information in this article applies to:
- Microsoft FoxPro for Windows, version 2.5, 2.5a, and 2.5b
SUMMARY
You can build report that skips one or more lines every so many detail
lines by using the procedure described below.
MORE INFORMATION
The following procedure will create a report that skips one line every five
detail lines:
- Create a quick report or open an existing report.
- From the Report menu, choose Variables.
- Choose the Add button and enter the following information in the
Report Variables dialog box:
Variable Name: REC
Value to Store: any numeric database field
Initial Value: 0
Reset: End of Report or End of page
Calculate: Count
NOTE: If Value to Store is not a numeric field, an "Invalid function
argument value, type, or count" error message is displayed.
- Choose OK twice.
- Drag the Detail band separator button so that there is enough room for
another line in the Detail band.
- Choose the Field tool.
- Drag in the Detail band to define the position and size of the new
field.
- Choose the Expression button, and type the following in the Report
Expression dialog box:
"HI"
- Choose the Verify button to confirm that the expression is valid.
- Choose OK.
- Select the Print When check box.
- Select the Print Only When Expression Is True check box.
- Type the following in the Print Field When Expression dialog box:
MOD(REC,5)=0
NOTE: You can modify this command to skip a different number of detail
lines by changing the number 5 to the number you want.
- Choose the Verify button to confirm that the expression is valid.
- Choose OK.
- Select the Remove Line If Blank check box.
- Choose OK twice.
- Select the new field and move it so it is on the last line of the
Detail band by itself.
- Select the new field, and choose Pen Color and then White from the
Object menu.
- Double-click the Detail band separator button.
- Clear the Constant Band Height check box.
- To add more than one blank line, repeat step 5, and then select the
field created in steps 6-17. From the Edit menu, choose Copy. From the
Edit menu, choose Paste. Repeat step 18.
|