Microsoft KB Archive/138426

= How to Make a Dynamic Rectangle Expand/Shrink to Fit the Data =

Article ID: 138426

Article Last Modified on 2/11/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q138426



SUMMARY
In a report, you can show information in a grouped format surrounded by a rectangle that expands (stretches) or shrinks dynamically according to the amount of data to be printed. This article covers the steps necessary to add such a floating rectangle.



Step-by-Step Procedure to Add Floating Rectangle
  Enter each of the following commands in the Command window: SET DEFAULT TO SYS(2004)+"\SAMPLES\DATA" OPEN DATA testdata CREATE REPORT TestRepo  With the report selected, on the View menu, click Data Environment. With the Data Environment selected, on the DataEnvironment menu, click Add. In the Add dialog box, choose the Employee table. Drag the Notes field from the Employee table, and drop it on the report. Size the field so it takes up little horizontal space. With the field selected, right-click to bring up the properties sheet. Select "Fix relative to Top of Band" and "Stretch with overflow." Then click OK. From the Report Controls toolbar, select the Rectangle tool and draw a rectangle around the employee.notes field. With the rectangle still selected, right-click to bring up the properties sheet. Select "Fix Relative to Top of Band" from the Object Position dialog box, and select "Stretch relative to tallest object in group" from the Stretch Downwards dialog box. Then click OK. With the rectangle still selected, hold down the SHIFT key, and click the employee.notes field to select it and to add it to the list of selected objects. On the Format menu, click Group to group the two objects together. Save and run the report. You should see the rectangle stretch to accommodate the data printed in the employee.notes field.</li></ol>

Additional query words: VFoxWin

Keywords: KB138426

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.