How to Remove Blank Lines in FoxPro Labels and ReportsLast reviewed: April 17, 1995Article ID: Q87851 |
The information in this article applies to:
SUMMARYBlank lines can appear in your labels and reports if an expression in the definition evaluates to null. Below is an example that demonstrates how to remove these blank lines.
MORE INFORMATIONA common example is the presence in a database of two address fields, ADDRESS1 and ADDRESS2, where ADDRESS2 is sometimes empty. Sample label definition:
COMPANY ADDRESS1 ADDRESS2; TRIM(CITY) + ", " + STATE + " " + LTRIM(ZIP)To prevent blank lines from printing in your labels if certain customers don't have ADDRESS2 fields, place a semicolon after ADDRESS2 in the label definition. If ADDRESS2 (or any other expression followed by a semicolon) evaluates to null, that line is removed from the label and the remaining lines are moved up. NOTE: Placing a comma between fields in a label expression automatically trims the preceding field and places a single space between it and the following field.
Removing Blank Lines and Empty Fields in ReportsBlank lines can appear in your reports if an expression in the definition evaluates to null. A common example is the presence in a database of two address fields, ADDRESS1 and ADDRESS2, where ADDRESS1 always contains data and ADDRESS2 is sometimes empty. Sample report definition to remove blanks if ADDRESS2 is empty (detail bands):
Detail | COMPANY Detail | ADDRESS1 + ";" + ALLTRIM(ADDRESS2) Detail | TRIM(CITY) + ", " + STATE + " " + LTRIM(ZIP) Detail | MDY(DATE()) Detail |To prevent blank lines from printing in your report if certain customers don't have ADDRESS2 fields:
Listed below is a sample report definition to remove blanks if ADDRESS1 or ADDRESS2 is empty (detail bands):
Detail | COMPANY + ALLTRIM(ADDRESS1) + ";" + ALLTRIM(ADDRESS2) Detail | TRIM(CITY) + ", " + STATE + " " + LTRIM(ZIP) Detail | MDY(DATE()) Detail |To prevent a blank line from printing in your report if certain customers don't have an ADDRESS1 or an ADDRESS2 field:
|
Additional reference words: FoxDos 2.00 2.50 2.50a suppress
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |