BUG: Report Writer Creates Child Records in One-to-Many ReportLast reviewed: April 25, 1997Article ID: Q137413 |
The information in this article applies to:
SYMPTOMSWhen you create a one-to-many report by using the Visual FoxPro Report Writer, 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.
WORKAROUNDFor 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 fieldsIn the Print When clause, click Remove Line If Blank.
For Any Numeric Data typeIn the Format dialog box, click Blank if Zero. Then in the Print When dialog box, click Remove Line If Blank.
For Date or DateTime FieldsIn 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 FieldsIn 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.
STATUSMicrosoft 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.
MORE INFORMATION
Steps to Reproduce Problem
|
KBCategory: kbtool kbbuglist
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |