次の方法で共有


How to: Create Reports (Visual FoxPro)

Depending on the complexity of the report or level of customization you want, you can create reports in several ways:

  • Create a simple report from a single or multiple tables using a report wizard.

    A wizard is the easiest way to start creating a report. For more information, see Creating Reports Using Wizards.

  • Create a simple report from a single table using Quick Report in the Report Designer.

    Quick Report is the fastest way to create a simple report and offers customization features of the Report Designer. For more information, see Creating Reports Using Quick Report.

  • Create a custom report or modify an existing report using the Report Designer.

    Report Designer begins the report design process with a blank report layout. The Report Designer and Label Designer are similar in functionality but differ in the default page and paper they use. For more information, see Creating Reports Using the Report Designer.

You can modify any report layout file you create with the Report Designer.

Creating Reports Using Wizards

You can create reports easily by using a report wizard. The report wizards help you set up and create a report layout using your answers to a series of questions. You can use the Report Wizard to create reports with single tables, for example, to create a list of names and addresses from a customer table. You can use the One-To-Many Report Wizard to create reports with tables that have a parent-child relationship, for example, to create a list of orders for a customer from a customer table and an orders table.

To start a report wizard

  1. Open the project for your application.

  2. In the Project Manager, expand the Documents node.

  3. In the Documents node, click Reports and then New.

  4. In the New Report dialog box, click Report Wizard.

  5. Select the type of report you want to create.

  6. Follow the instructions on the wizard screens.

For more information, see Report Wizard and One-To-Many Report Wizard.

You can also start wizards from the Tools menu by clicking Wizards and selecting a wizard. After you create a layout using a wizard, you customize the layout using the Report Designer.

Creating Reports Using Quick Report

You can create reports quickly by using Quick Report, which creates a simple report from a single table.

Tip

You can use Quick Report in existing report files if the Detail band is empty. If the Page Header band contains controls, Quick Report saves them.

Note

Quick Report does not add General fields to the report layout.

To create a quick report

  1. Open the project for your application.

  2. In the Project Manager, expand the Documents node.

  3. In the Documents node, click Reports and then New.

  4. In the New Report dialog box, click New Report.

    The Report Designer opens.

  5. On the Report menu, click Quick Report.

  6. In the Open dialog box, browse to the directory containing the table you want and select the table.

  7. In the Quick Report dialog box, click the field layout you want.

  8. To select specific fields to include, click Fields. When you are finished selecting fields, click OK.

    Note

    By default, all fields except General fields in the table are included.

  9. Select or clear the Title, Add alias, or Add table to data environment settings.

  10. When you are finished in the Quick Report dialog box, click OK.

For more information, see Quick Report Dialog Box.

You can also start a quick report from the File menu by clicking New and in the New dialog box, click Report and then New File. The Report Designer appears. To continue, follow the remaining steps described for creating a quick report.

You can create a quick report programmatically without opening the Report Designer by using the Quick Report version of the CREATE REPORT command. For more information, see CREATE REPORT - Quick Report Command.

Creating Reports Using the Report Designer

You can create custom reports by starting with a blank report layout in the Report Designer.

Note

The Report Designer and Label Designer are similar in functionality but differ in the default page and paper they use.

To start the Report Designer

  1. Open the project for your application.

  2. In the Project Manager, expand the Documents node.

  3. In the Documents node, click Reports and then New.

  4. In the New Report dialog box, click New Report.

    The Report Designer opens.

For more information, see Report Designer.

You can also start a new blank report from the File menu by clicking New and in the New dialog box, click Report and then New File.

You can open the Report Designer programmatically using the CREATE REPORT and MODIFY REPORT commands. For more information, see CREATE REPORT Command and MODIFY REPORT Command.

See Also

Tasks

How to: Create Labels

How to: Open Reports and Labels

Concepts

Reports in Visual FoxPro

Reference

Considerations for Creating Reports

Other Resources

Working with Reports