Converting dBASE Reports and Labels

See Also

Visual FoxPro converts dBASE reports and labels when you modify them in Visual FoxPro.

When Visual FoxPro converts reports and labels, Visual FoxPro creates an .frx file with the information from the dBASE .frm file, and an .lbx file with the information from the dBASE .lbl file.

Visual FoxPro converts all bands, fields, calculated fields, hidden fields, picture templates, and functions for fields. Visual FoxPro also converts style attributes such as underline, bold, italic, and colors. Fonts are not converted. However, Visual FoxPro supports all Windows-based fonts including TrueType fonts, giving you even greater control over this area than before.

Wordwrap bands are converted to a series of one-line text fields in Visual FoxPro reports. Band spacing and pitch information is not converted. Visual FoxPro does not use a global ruler or a word-wrap paragraph ruler, so this information is not retained. Converted reports will have a right margin equal to the width of the report. The left margin is not changed but can be set in the Visual FoxPro Report Designer.

If you have reports with tab characters, you might need to rearrange fields to achieve the desired appearance.

Differences After Conversion

Since empty report bands print in dBASE, Visual FoxPro adds null characters to these bands so they will also print in Visual FoxPro.

dBASE reports do not store complete environment information, only database aliases. As a result, upon opening a converted report, you might get an error such as "Customer.dbf not found." Visual FoxPro reports can save database names, relations, skips, and index information. Once in the Report Designer, use the data environment to set up the environment the way you want it, and then save that information with that report. No more such errors will appear.

Hard-Coded Reports

Hard-coded reports are recompiled as a .prg file in Visual FoxPro. You can run the report in the same way you run a program in the Windows Explorer: select the file and then choose Run.

For more information, see the section, “Designing Reports,” in Chapter 7, Designing Reports and Labels, in the User’s Guide, and, "Controlling Data Sources," in Chapter 12, Adding Queries and Reports, in the Programmer’s Guide.