Condividi tramite


CREATE REPORT - Quick Report Command

Creates a report without opening the Report Designer.

CREATE REPORT FileName | ? FROM Source [FORM | COLUMN]
 [FIELDS FieldList] [ALIAS] [NOOVERWRITE] [WIDTH nColumns]

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.

  • FROM Source
    Specifies the name of the table to create the report from, which does not need to be open, or the alias of an open table. For example:

    LOCAL lcFile
    USE ? ALIAS temp
    lcFile = PUTFILE("Report name","myreport.frx")
    IF NOT EMPTY(lcFile)
       CREATE REPORT (lcFile) ;
          FROM (ALIAS())
    ENDIF
    

    Tip

    Note that this code does not check EMPTY(ALIAS()) before using Quick Report syntax. If no table is open in the current workarea, Visual FoxPro displays the open table dialog.

  • [FORM | COLUMN]
    Specifies to create the report with the fields and their names arranged from top to bottom in the Detail band or with the fields arranged from left to right across the page in the Detail band. When specifying COLUMN, the field names are placed in the Page Header band.

    Note

    If you omit FORM and COLUMN, the report defaults to COLUMN format.

  • [FIELDS FieldList]
    Specifies the fields in the table that appear in the report. Use commas to separate the fields in FieldList.

  • [ALIAS]
    Specifies to add the table alias to the field names in the report.

  • [NOOVERWRITE]
    Specifies not to overwrite an existing report. If a report already exists with the file name specified with FileName1, the report is not created.

  • [WIDTH nColumns]
    Specifies the width of the report page in columns.

Remarks

You can also create reports in Report Designer by using another version of CREATE REPORT. For more information, see CREATE REPORT Command.

You can also create reports using a wizard. For more information, see How to: Create Reports (Visual FoxPro).

Depending on the setting of the _REPORTBUILDER system variable, this command may display additional dialogs as the report builder augments the quick report process. For more information, see _REPORTBUILDER System Variable.

See Also

Reference

MODIFY REPORT Command

REPORT FORM Command

Report Designer

Other Resources

Working with Reports

Commands (Visual FoxPro)

Language Reference (Visual FoxPro)