BUG: Report Designer creates child records in one-to-many report in Visual FoxPro (137413)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q137413 SYMPTOMS
When you create a one-to-many report by using the Visual FoxPro Report Designer, blank child records are created for parent records without matching
children. Numeric fields are represented by zeroes, character fields are
represented by spaces, date fields are represented by a blank date
separated by slashes, and logical fields are represented by a false (.F.)
value. This behavior occurs if data from the child table is placed in the
Detail band of the report.
WORKAROUND
For each data type, the workaround is slightly different. The Report
Expression for each field in the Detail band linked to the child table must
be modified.
For Character fields
In the Print When clause, click Remove Line If Blank.
For Any Numeric Data type
In the Format dialog box, click Blank if Zero. Then in the Print When
dialog box, click Remove Line If Blank.
For Date or DateTime Fields
In the Print When dialog box, click Remove Line if Blank. Type the
following in the "Print Only When Expression is True" box:
!EMPTY(child.date_field)
Here date_field is the name of your date field.
For Logical Fields
In the Print When dialog box, click Remove Line if Blank. Type the
following in the "Print Only When Expression is True" box:
!EMPTY(child.key_Field)
In this expression, use the child table's key field that links it to the
parent table to see if it is empty. If the child table's key field is
empty, you know there is no child record. The Report Writer automatically
assigns logical fields a value of false (.F.), therefore the Remove Line if
Blank option will not work on its own.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. We are researching this problem
and will post new information here in the Microsoft Knowledge Base as it
becomes available.
Modification Type: | Major | Last Reviewed: | 2/18/2005 |
---|
Keywords: | kbBug KB137413 |
---|
|