4D v14.3QR REPORT |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
QR REPORT
|
QR REPORT ( {aTable ;} document {; hierarchical {; wizard {; search {; methodName {; *}}}} ) | ||||||||
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) | |||||
methodName | String |
![]() |
Name of method to call | |||||
* | Operator |
![]() |
Deletion of printing dialog boxes | |||||
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 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).
The methodName parameter designates a 4D project method that will be executed each time a command of the Quick Report editor is called by selecting a menu item or clicking on a button. Using this parameter is equivalent to using QR ON COMMAND in the context of the Quick Report editor window (QR ON COMMAND only works within the context of an included area). More particularly, you can use this new parameter to change the character set used by the quick report.
The methodName method receives two parameters:
Note: If you want to compile your database using the Compiler, you must declare the $1 et $2 parameters explicitly as longints, even if you do not use them.
If you want to execute the initial command chosen by the user, use the following statement in the methodName method:
QR EXECUTE COMMAND($1;$2).
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:
The following example lets the user query the [People] table, and then automatically prints the report “Detailed Listing”:
The following example lets the user query the [People] table, and then lets the user choose which report to print:
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:
Refer to the example of the SET FIELD RELATION command.
You want to convert the character set used in a quick report called using QR REPORT into Mac Roman:
The myCallbackMeth method converts the report when it is generated:
C_LONGINT($1;$2)
If($2=qr cmd generate) //if we generated a report
C_BLOB($myblob)
C_TEXT($path;$text)
QR EXECUTE COMMAND($1;$2) //execution of command
QR GET DESTINATION($1;$type;$path) //retrieval of destination
DOCUMENT TO BLOB($path;$myblob)
//conversion to text using UTF-8
$text:=Convert to text($myblob;"UTF-8")
//use of MacRoman set
CONVERT FROM TEXT($text;"MacRoman";$myblob)
//Return of converted report
BLOB TO DOCUMENT($path;$myblob)
Else //otherwise, execution of the command
QR EXECUTE COMMAND($1;$2)
End if
Product: 4D
Theme: Quick Report
Number:
197
Modified: 4D 2004
Modified: 4D v14
PRINT LABEL
PRINT SELECTION
SET ALLOWED METHODS
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)
Inherited from : QR REPORT ( 4D v12.4)