Share via


CREATE REPORT Command

Opens the Report Designer to create a report in standard report format or to design a custom report.

CREATE REPORT [FileName | ?] [NOWAIT] [SAVE] [WINDOW WindowName1]
   [IN [WINDOW] WindowName2 | IN SCREEN] [PROTECTED]

Parameters

  • [ FileName| ?]
    Specifies the file name for the report or displays the Create dialog box so you can type the name of the report file to create. The default file name extension for reports is .frx.

    Note

    If the report file you specify already exists, Visual FoxPro prompts you to overwrite the existing file if the SET SAFETY command is set to ON. Calling CREATE REPORT without arguments opens the Report Designer and assigns the report file with the default name of ReportVersionNumber. When you close the Report Designer, Visual FoxPro prompts you to save changes to the report and provide a different name.

  • [NOWAIT]
    Continues program execution after the Report Designer opens. The program does not wait for the Report Designer to close but continues program execution on the immediate following line. If you omit NOWAIT, the Report Designer opens, and program execution pauses until the Report Designer closes.

    When calling CREATE REPORT with NOWAIT in the Command window, NOWAIT has no effect.

  • [SAVE]
    Specifies that the Report Designer remain open after activating another window. If you omit SAVE, the Report Designer closes when you activate another window.

    When calling CREATE REPORT with SAVE in the Command window, SAVE has no effect.

  • [WINDOW WindowName1]
    Specifies a window whose characteristics the Report Designer inherit.

    For example, if the window specified was created with the FLOAT option of DEFINE WINDOW, you can move the Report Designer. The specified window must be defined, but it does not need to be active or visible.

    Note

    The Report Designer has a default size that can be larger than the specified window. In this case, the Report Designer still inherits the characteristics of the window with the upper-left corner of the Report Designer placed at the same coordinates as the upper-left corner of the specified window but extends beyond the specified window's borders.

  • [IN [WINDOW] WindowName2| IN SCREEN]
    Specifies to open the Report Designer in a parent window or in the main Visual FoxPro window after placing the Label Designer in a parent window. The Report Designer does not assume the characteristics of the parent window and cannot move outside the parent window. If the parent window is moved, the Report Designer moves with it.

    Note

    You must first define the parent window using DEFINE WINDOW and make it visible for access by the Report Designer.

  • [PROTECTED]
    This clause is ignored by the Report Designer by default, because a newly created report layout will not have any protection flags set. However, a report builder can be written to take specific action if this clause is present in the collection of command line parameters. For example, the default Report Builder will respect this clause by hiding the Protection tab of the Report Properties dialog box. See Understanding Report Builder Events for more information.

Remarks

You can also create reports using a wizard. For more information, see How to: Create Reports (Visual FoxPro). You can also create quick reports without opening the Report Designer using another version of CREATE REPORT. For more information, see CREATE REPORT - Quick Report Command.

See Also

Reference

Report Designer

REPORT FORM Command

MODIFY REPORT Command

Other Resources

Working with Reports

Commands (Visual FoxPro)

Language Reference (Visual FoxPro)