version 2004 (Modified)
QR REPORT ({aTable; }document{; hierarchical{; wizard{; search}}}{; *})
Parameter | Type | Description | |
aTable | Table | Table to use for the report, or Default table if omitted | |
document | String | Quick Report document to load | |
hierarchical | Boolean | True = Display related Many tables | |
False or omitted = Do not display (default) | |||
wizard | Boolean | True = Display the wizard button | |
False or omitted = Do not display (default) | |||
search | Boolean | True = Display the search tools and master table | |
choice, False or omitted = Do not display (default) | |||
* | * | Deletion of printing dialog boxes |
Description
QR REPORT prints a report for aTable, created with the Quick Report editor shown here.
The Quick Report editor allows users to create their own reports. See the 4D Design Reference manual for details on creating reports with the Quick Report editor.
Notes:
The editor does not appear if the table has been declared "Invisible."
When the editor is called using the QR REPORT command, the All relations in automatic option that is used to modify the automatic/manual status of the relations is hidden. This allows the developer to manage this status himself using the SET AUTOMATIC RELATIONS and SET FIELD RELATION command.
The document parameter is a report document that was created with the Quick Report editor and saved on disk. The document stores the specifications of the report, not the records to be printed.
If an empty string ("") is specified for document, QR REPORT displays an Open File dialog box and the user can select the report to print.
If the document parameter specifies a document that does not exist (for example, pass Char(1) in document), the Quick Report editor is displayed.
The hierarchical parameter defines whether the related Many tables are displayed in the field selection list. By default, this value is set to 0 (no display for related Many tables).
The wizard parameter indicates whether the Open Wizard button is going to be displayed in the Quick Report editor, therefore either allowing or disallowing access to the wizard. By default, this value is set to False (no access to the wizard).
The search parameter indicates whether the New Query button and the Master table drop-down menu are going to be displayed in the Quick Report editor, therefore either allowing or disallowing modification of the current table and current master table. By default, this value is set to False (no access to the search tools and master table).
After a report is selected, the dialog boxes for printing are displayed, unless the * parameter is specified. If this parameter is specified, these dialog boxes are not displayed. The report is then printed.
If the Quick Report editor is not involved, the OK variable is set to 1 if a report is printed; otherwise, it is set to 0 (zero) (i.e., if the user clicked Cancel in the printing dialog boxes).
4D Server: This command can be executed on 4D Server within the framework of a stored procedure. In this context:
Make sure that no dialog box appears on the server machine (except for a specific requirement). To do this, it is necessary to call the command with the * or > parameter.
The syntax which makes the label editor appear does not work with 4D Server; in this case, the system variable OK is set to 0.
In the case of a problem concerning the printer (out of paper, printer disconnected, etc.), no error message is generated.
Examples
1. The following example lets the user query the [People] table, and then automatically prints the report "Detailed Listing":
QUERY ([People]) If (OK=1) QR REPORT ([People];"Detailed Listing";False;False;False;*) End if
2. The following example lets the user query the [People] table, and then lets the user choose which report to print:
QUERY ([People]) If (OK=1) QR REPORT ([People];"";False;False;False) End if
3. The following example lets the user query the [People] table, and then displays the Quick Report editor so the user can design, save, load and print any reports with or without the wizard:
QUERY ([People]) If (OK=1) QR REPORT ([People];Char(1);False;True) End if
4. Refer to the example of the SET FIELD RELATION command.
See Also
PRINT LABEL, PRINT SELECTION, SET ALLOWED METHODS.