PRB: Bottom Margin in Report Incorrect w/ Multiple Memo Fields

Last reviewed: April 30, 1996
Article ID: Q113161
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b
  • Microsoft FoxPro for Macintosh, version 2.5b

SYMPTOMS

When you have multiple memo fields in a report, the first few pages have a larger bottom margin than is defined for the report. This bottom margin decreases for each successive page in the report.

RESOLUTION

See "Workaround" in the "More Information" section below.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

NOTE: In the example below, it makes no difference if:

  • The size of the data in the memo fields is different
  • If the report is only 1 column
  • If the report measurement is changed from "Inches" to "CM"
  • If the font is changed

These details are provided simply to ensure that you see consistent results.

  1. Run the following code. This code closes any open tables, creates a MEMOPRT table containing several memo fields, and populates the memo fields with data.

          CLOSE DATABASES
          CREATE TABLE memoprt (field1 M, field2 M, field3 M, field4 M, ;
    
                        field5 M, field6 M, field7 M, field8 M, ;
                       field9 M, field10 m)
    
          INSERT INTO memoprt (field1, field2, field3, field4, field5, ;
                     field6, field7, field8, field9, field10) ;
                VALUES  (REPLICATE('a',3000), REPLICATE('b',3000), ;
                      REPLICATE('c',3000), REPLICATE('d',3000), ;
                      REPLICATE('e',3000), REPLICATE('f',3000), ;
                      REPLICATE('g',3000), REPLICATE('h',3000), ;
                      REPLICATE('i',3000), REPLICATE('j',3000))
    
    

  2. In the Command window, issue the following command:

          CREATE REPORT memotest
    

  3. From the Report menu, choose Page Layout. Set Columns to 1, set Dimensions to Inches, and set Print Area to Printable Page.

  4. In the Page Layout screen, choose the Font button, and then change the font to Arial, Regular, 8 point.

  5. In the Detail band of the report, place each of the memo fields from the MEMOPRT table; stack the fields one above the other. Size each memo field so that it is the entire width of the band. In the Report Expression dialog box for each memo field, select the Top -- Field Can Stretch option under Position Relative To.

  6. From the Report menu, choose Page Preview. The bottom margin on the first page is quite large. As you use the Next button to move to successive pages, you will see that the bottom margin gradually becomes smaller and smaller.

Workaround

Place each memo field in a data group, as follows:

  1. Assuming you have performed steps 1-5 above, return to the Report Layout window.

  2. From the Report menu, choose Data Grouping.

  3. Choose the Add button.

  4. In the Group Info dialog box, choose the Group button. This opens the Expression Builder dialog box.

  5. Select the first memo field in the Fields box.

  6. Choose OK twice. This will return you to the Data Grouping dialog box.

  7. Repeat steps 3-6 for all the memo fields.

  8. When you are done, choose OK to close the Data Grouping dialog box.

  9. Position each memo field within the data group you have defined for it and choose Page Preview from the Report menu.

The text of the report should now flow more evenly to the bottom margin of the page.


Additional reference words: FoxMac FoxWin 2.50 2.50a 2.50b
report writer
KBCategory: kbprg kbprb
KBSubcategory: FxprintFont


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 30, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.