The information in this article applies to:
SUMMARYThis information is also available in FoxPro's online help system.
MORE INFORMATIONThis topic contains a variety of Report Writer tips. Run Existing Reports Without ChangesYour character reports (reports designed in FoxPro for MS-DOS) can be run, previewed and printed in FoxPro for Windows exactly as they were in MS-DOS, without any modification. If you want, you can transport your character mode reports into Windows to take advantage of the graphical environment by opening them in FoxPro for Windows. Auto-Floating FieldsIn FoxPro for MS-DOS, making fields stretch to accommodate data and float to maintain their relative position below other stretching fields are two separate operations. In FoxPro for Windows, fields automatically float when they are set to stretch. You can give a field the capability to stretch by choosing the Top -- Field Can Stretch radio button in the Position Relative To area of the Report Expression dialog. Field SizeIf you have a field that is smaller than the number of digits to be printed, FoxPro prints a series of asterisks to alert you that the complete number could not be printed. Fractions are rounded to fit the space you have allowed the field or expression. In FoxPro for Windows, changing the size of fields and graphic objects is as simple as clicking on an object handle (one of the small squares around the object when it is selected) and dragging. Indicating Details "Continued" Over Page or Column BreaksIf you have stretching fields in a detail band, the detail band could extend over page or column breaks. You can include text to indicate when detail bands are continued on a new page or in a new column:
When the detail band is continued on another page or in another column, "continued" is printed. Otherwise, "continued" is not printed. Using the GridWhen Snap to Grid on the Report menu is checked, objects are positioned according to an invisible alignment grid. You can change the size of this grid by changing the number in the horizontal (H) and vertical (V) spinners in the Grid area of the Ruler/Grid dialog (opened from the Report menu). The minimum grid size is one pixel and the maximum grid size is 48 pixels. Fine-Tuning Object Position in ReportsPressing an arrow key moves selected objects one pixel at a time, regardless of the setting of Snap to Grid. Holding SHIFT while pressing an arrow key resizes the selected object one pixel at a time, regardless of the setting of Snap to Grid. Graphic ElementsRectangles, rounded-rectangles and vertical lines can extend across several bands, for example, from the page header band to the page footer band or from a group header band to a group footer band. These graphic elements within a detail band can be made to stretch with the band by double- clicking on them and choosing Stretch with Band in the Rectangle/Line dialog. Fonts in Page PreviewWith some fonts, if you have a fairly small font size (8 or 10 point), you may not be able to see much difference between bold and regular type in the Page Preview dialog due to screen graphics. In the printed report, though, bold and regular type are clearly distinguished. Remove Line If BlankIn FoxPro for MS-DOS, Suppress Blank Lines, once checked, applies to all objects in a report's detail band. In FoxPro for Windows, Remove Line If Blank performs the same function object by object in any band in the report. Remove Line If Blank must be checked for each object in a horizontal span across the detail band in order for blank lines to be removed. Report VariablesReport variables allow you to do calculations that can be used in subsequent calculations. For example, if you wanted to make a time sheet report, if you have these numeric fields in a table (hour_in, min_in, hour_out, min_out), you could define a variable ARRIVE with the following expression: HOUR_IN + (MIN_IN / 60) Another variable, LEAVE, would contain a similar expression: HOUR_OUT + (MIN_OUT / 60) A third variable, DAYTOTAL, could hold the total amount of hours worked during the day. Assign it the following expression: LEAVE - ARRIVE This third variable, could be used in a variety of other calculations to determine the number of hours worked in a week, a month, a year, the average number of hours worked each day, and so on. Report Variable HintsWhen setting up report variables, remember the following: Utilizing Page SpaceObjects can be positioned partially underneath band separator bars to allow for maximum utilization of space on each page of your report. Whole Page versus Printable PageIn the Page Layout dialog, you have the option to choose a print area of Printable Page or Whole Page. If you choose Printable Page, FoxPro sets the margins of the report according to the specifications of your default printer. Information will not be cut off along the edges of the page. A left margin of 0.0 causes text to print at the edge of the printable area on the page. Fields or text flush with the margins in the Report Layout window will not be cut off in the printed report. Summary ReportsIn FoxPro for MS-DOS, you can save a report as a summary report. In FoxPro for Windows, you can print a report as a summary report by choosing More >> in the Report dialog and checking Summary Information Only, or by typing REPORT FORM <report name> TO PRINTER SUMMARY in the Command window and pressing Enter. (See the REPORT topic for other clauses that can be included with the command.) In FoxPro for Windows, group footers can stretch to accommodate lengthy data. If a group footer will not fit completely on a page, it is printed in its entirety on the next page of the report. You need to make sure that your group footers aren't too long to fit on a single page. Additional query words: FoxWin on-line Keywords : FxprintFont Version : 2.60 Platform : WINDOWS Issue type : |
Last Reviewed: August 3, 1999 |