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]
- 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
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.
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.
Specifies to add the table alias to the field names in the report.
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.
You can also create reports in Report Designer by using another version of CREATE REPORT. For more information, see.
You can also create reports using a wizard. For more information, see.
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.