Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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
NoteTip

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.

NoteNote

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.

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.