dbms_library.comp provides database interface. Some of its methods are also used by frame.html. .mql files. | Subroutine Name | Parameter Name | Valid Input | Description | 
|---|---|---|---|
| check_where_clause() | |||
| Permission() | |||
| $permission_group | Group to which user must be authorized. | ||
| $table | Name of the table for which the permission is being checked. | ||
| ReportMethod() | The subroutine checks the $reportparameter for suffix and returns which report utility is used. | ||
| $report | report_name.odt,report_name.pdf,report_name.rep | Report name. If the $reportis not defined or there is no suffix the utility is chosen based on value of theDefaultReportEnginevariable from the Apache config file. | |
| CheckIfReportExists() | If the report method is odtorpdfthe subroutine checks if the report name can be found in public.odt_reports table.If the report method is repthe subroutine uses FindReportmanFile() to search and validate the found report file. The subroutine returns 1 on success and 0 on failure. | ||
| $table | Name of the table for which the permission is being checked. | 
check_where_clause() subroutine parses the query and verifies that only authorized keywords, fields and operators are used. Here are the methods that change its behavior:
| Method Name | Description | Default Contents | 
|---|---|---|
| PERMISSION | Is used for overriding of the default PERMISSION_BY_PROFILE. | <%method PERMISSION><&SELF:PERMISSION_BY_PROFILE&></%method> | 
| PERMISSION_BY_PROFILE | It reads permissions for the record-set manipulation based on the user's profile. It is used often to return user's permissions of the current FUNZIONE. | Possible return values: INSERT, SELECT, UPDATE, DELETE, ...;Empty return is equivalent to have no permissions allowed; *is equivalent to having all permissions. | 
| AUTHORIZED_FUNCTIONS | A list of authorized functions. Used to check queries from browser. | Empty. | 
| AUTHORIZED_KEYWORDS | A list of authorized keywords. Used to check queries from browser. | Default keywords are AND, OR, NOT, IS, NULL. | 
| AUTHORIZED_OPERATORS | A list of authorized operators. Used to check queries from browser. | Default authorized operators are <=, >=, =, <, >, =, ~*, LIKE, ILIKE | 
| AUTHORIZED_FIELDS | A list of authorized fields. Used to check queries from browser. | Default list is <& SELF:KEY &>, <& SELF:FIELDS &>, <& SELF:FIND_FIELDS &> | 
| Method Name | Description | Default Contents | Example | 
|---|---|---|---|
| CHILD_SELECTED | Is intended to be used with multiple child tables; It indicates which child tab is activated when the page is loaded. | It is empty by default which indicates the first tab will be opened. | <%method CHILD_SELECTED> | 
| SCHEMA_CHILD_SELECTED | Overloads the default method. | <&SELF:SCHEMA&> | <%method SCHEMA_CHILD_SELECTED> | 
| CHILDREN | A comma separated list of children. | Empty by default. | See the CONFIGURING FATHER .MQL example. | 
| CHILDREN_FIELDS | A comma separated list of key fields. | Empty by default. | See the CONFIGURING FATHER .MQL example. | 
| SCHEMA_CHILDREN | A comma separated list of children each prefixed with SELF:SCHEMA | The list SELF:CHILDRENwith each child prefixed by theSELF:SCHEMA. | <%method SCHEMA_CHILDREN> | 
| KEY | Indicates a primary key of a table. | <&SELF:FROM&> | <%method KEY> | 
| KEY_NAME | A primary key field without a table name. | By default it's derived from the database. | <%method KEY_NAME> | 
| SERIAL_SEQ | A serial sequence name. | <%method SERIAL_SEQ><&SELF:SCHEMA_FROM&>_ | <%method SERIAL_SEQ> | 
| SELECT_CHILDREN_ID | A select statement which is used for listing children keys. Parameters: $FIELDS,$WHERE,$ORDER | ||
| CHILDREN_CONTAINER | Is used in the frame.html | The default value is 'Stack'when there is one child or'Tab'when there's many children (Tab & Stack are Dojo tooolkit containers) | |
| CHILD_TEMPLATE | Is used in the frame.html; If the method exist in child .mqlfile it changes its type of form. | Does not exist by default. | <%method CHILD_TEMPLATE>,<%method CHILD_TEMPLATE>,<%method CHILD_TEMPLATE>,<%method CHILD_TEMPLATE>or<%method CHILD_TEMPLATE> | 
| ORDER | Determines how to order a table, which columns to order by. It is important that the sorting must be unique, otherwise the cache mechanism will report errors in the sorting of keys in the cache. | Empty by default. The recordset is ordered with ascendig primary key. | <%method ORDER> | 
| GUI_ORDER | GUI user sorting. List of fields (separated by ",") that the user can sort from the browser. For each field, in addition to the name, the sorting type applied as default (in the list order) and possibly the SQL field code. - ASC or blank = ascending sort - DESC = descending sort - SEL = orderable field in the GUI In the forms the user can reverse or cancel the sorting of the fields declared here with a click on the field header. Each variation moves the field to the bottom of the sorting. A double click on the fields header resets the user-modifiable sorting and the sorting will set by ORDER. | Empty by default. The recordset is ordered with ORDER. | <%method ORDER_GUI>name ASC UPPER(name), surname ASC UPPER(surname), year SEL, month SEL, day SEL</%method> | 
| FATHER | Provides foreign_key_name:father_table_name[:father_primary_key_name]parameters. | Empty by default. | See the CONFIGURING CHILD .MQL example. | 
| FATHER_WHERE | It returns where statement composed of the foreign_key_nameand$FATHER_IDparameter. | Extracts a foreign_key_namefrom theFATHERmethod. Returns<% $field %> = <%$father_id%>string. The$father_idis str2sql_js_delimited($FATHER_ID). | |
| FATHER_ID_NAME | It obtains the father ID field name ( foreign_key_name) to be used in insert and update. | Extracts the field name from the FATHERmethod. | |
| FATHER_NAME | It returns a father_table_name. | Extracts a full name of the father table ( schema.father_name) from theFATHERmethod. | |
| FATHER_KEY_NAME | It returns an idof the father table (father_primary_key_name). | Extracts a father idfrom theFATHERmethod.It also verifies that the father .mqlfile exists. | |
| FATHER_TABLE_KEY_NAME | It returns a table.idof the father table. | Extracts a father tableandidfrom theFATHERmethod.It also verifies that the father .mqlfile exists. | 
FIELDS methods were already encountered in previous chapters; Here's the complete list of the FIELDS methods:
| Method Name | Description | Default Contents | Example Usage | 
|---|---|---|---|
| FIELDS | The list of fields from a table to be queried. | <%method FIELDS> | See the CONFIGURING CHILD .MQL example. | 
| FIELDS_NOT_NULL | When one or more of fields listed in FIELDS_NOT_NULLis empty the row will not to be displayed. | Empty. | See the NULLS AND AGGREGATE EXPRESSIONS example. | 
| FIELDS_DESCR | Labels for the fields. | <%method FIELDS_DESCR> | <%method FIELDS_DESCR> | 
| FIELDS_RO | Marks fields as Read-Only in the GUI and in the database. | Empty. | <%method FIELDS_RO>*</%method><%method FIELDS_RO> | 
| FIELDS_RO_UPDATE | Marks fields as Read-Only in the GUI but they are still writable in the database. The method is useful for processing a values that can not be modified directly by an user. | <%method FIELDS_RO_UPDATE>By default the same list as FIELDS_ROmethod. | <%method FIELDS_RO_UPDATE> | 
| FIELDS_NO_WRITE | An user can supply values in the GUI but can not save them directly to the database. The method is useful for giving an user possibility to supply values which are then processed by the back-end. In practice it may be the value of a SQL view which is processed by the server and does not necessarily correspond to a value to be saved in the database. | <%method FIELDS_NO_WRITE>By default the same list as FIELDS_ROmethod. | <%method FIELDS_NO_WRITE> | 
| FIELDS_NEW | Defines a default new values when user clicks on the Nuovibutton.New default values are separated by comma in the order of method FIELDS. | Empty. | <%method FIELDS_NEW>,,,</%method>defines three new empty fields. | 
| FIELDS_DUP | Configures the Duplicabutton. When pressed the button adds a new record populated with the duplicate values from previous record. The button duplicates the current record (FORM) or the selected record if type isTABLEorDIVS. A comma separated list defines which fields to duplicate. The duplicated field must be marked with a lettersdorD. A field marked with upper case letterDis always copied. A field marked with lower case letterdis copied only if not empty. The fields that are not duplicated will be empty or set to default values defined in theFIELDS_NEWmethod. | When the method is empty the Duplicabutton is not shown. | <%method FIELDS_DUP> | 
| FIELDS_HIDDEN | A list of hidden fields; See also the HIDDENparameter of the INFO method. | Empty. | <%method FIELDS_HIDDEN> | 
FIELD methods:
| Method Name | Attribute/Parameter Name | Description | Example Usage | 
|---|---|---|---|
| _ALIAS | A field name alias. | <%method id_referente_ALIAS>id_socio</%method> | |
| _CHECK | The method that verifies the specified field. It can be <field_name>_CHECKor<alias>_CHECK | ||
| _FIELD | A _FIELDmethod determines how the field should be displayed. | Examples of _FIELDmethod usage:Adding Field Method, Adding Select Field, Adding HtmlSelect Field, Adding DivSelect Field, Adding Child Frame There are also a couple of examples of _FIELDmethods in the global_autohandler file. | |
| select_name_prefix | |||
| select_from | The select_fromis used for setting additional parameters to a select widget to optimize data transfer from server to the browser. | ||
| _OUT_FILTER | If the method is defined, applies the filter to the output of the specified field. Returns an array with two fields (value, parameter). | ||
| $field | A field name. | ||
| $key | A primary key value. | ||
| $value | A field value. | ||
| $names | An array of the field names. | ||
| $fetch_row | A hash of the field values. | ||
| $comp | A component ( .mql), if not defined using the basic component. | ||
| $noparam | If set to 1, it does not retrieve the parameters (used to optimize in cases where they are not used) | ||
| _NAME_PREFIX | |||
| _FROM | 
| Method Name | Parameter Name | Description | Default Value | 
|---|---|---|---|
| FIND | The method displays a find-bar for filtering the records. The method can position the find-bar on the left or on the right side of the web page. It uses the GENERIC_FINDmethod and the  FIND_FIELDS, FIND_FIELDS_DESCR settings to display the find-bar. | ||
| FIND_FIELD_WIDTH | |||
| FIND_MENU | The method displays a find-bar for filtering the records. The method positions the find-bar on the top or on the bottom of the web page. It uses the GENERIC_FINDmethod and theFIND_MENU_PRE, FIND_FIELDS, FIND_FIELDS_DESCR,FIND_MENU_POSTsettings to display the find-bar. | ||
| $find_fields | A list of fields an user is able to filter. | Default value is FIND_FIELDS. | |
| $Recordset | A DataBindingobject. | ||
| $Display | A DisplayBindingobject. | ||
| $DescrOnRight | Value of the MenuDescrOnRight parameter from the frame.html. | Undefined. | |
| GENERIC_FIND | The method displays one input field with find options. The FINDorFIND_MENUuse it to construct the find-bar. The find field width can be configured with theFIND_FIELD_WIDTHmethod. It's possible to customize theGENERIC_FINDbehavior for individual find-fields using the<field_name>_FIND_WIDGETmethods. | ||
| FIND_MENU_PRE | It is called from FIND_MENUmethod just before theFIND_MENUform. Example usage:<%method FIND_MENU_PRE><br><br><br></%method> | ||
| FIND_MENU_POST | It is called from FIND_MENUmethod just after theFIND_MENUform. | ||
| _FIND_FIELD | Defines an input widget to be used for specific find-field. Is used by the Find_Component() subroutine. | Does not exist by default. | |
| _FIND_ALIAS | Defines an input widget to be used for specific find-field. Is used by the Find_Component() subroutine. | Does not exist by default. | 
| Method Name | Arguments | Description | Default Contents | Example Usage | 
|---|---|---|---|---|
| SELECT_FIELDS | A list of fields to be inserted into table's selectquery. | <%method SELECT_FIELDS>By default identical to the FIELDSmethod. | <%method SELECT_FIELDS> | |
| JOIN_TABLES | Is used for defining additional join clauses. | <%method JOIN_TABLES> | See data/public/messages_users_detail.mqlanddata/public/user_messages.mql | |
| WHERE | A contents of WHERE statement. | Empty. | <%method WHERE> | |
| EVAL_WHERE | Evaluates the query provided by the browser. It is called from SelectWhere() to check the SQL query for unauthorized access (sql injection). | Method does not exist by default. | ||
| $where | The parameter contains the query from the browser. | |||
| SELECT_WHERE | Is passed to the EvalSqlWhere(). | <%method SELECT_WHERE> | ||
| PRE_SELECT | The method is called just before SELECT query. | Method does not exist by default. | See data/public/logs_report.mql | |
| $PARAMS | The argument contains optional parameters for the prepared query. | |||
| $ID | Parameter undefined by default. When defined it is compared to <&SELF:KEY&> = <% encodeSql($ID) | |||
| $WHERE | WHERE statement. | |||
| DIV_SELECT | 
| Method Name | Arguments | Description | Default Contents | 
|---|---|---|---|
| INSERT | Insert a new record. The metod is called from Array2UpdateSql() function which uses it with the Perl DBI. The Array2UpdateSql()first makes a prepared query then it executes it with the@{$LIST_VALUES}parameters. | insert into <&SELF:SCHEMA_FROM&> (<%$FIELDS%>) values (<%$VALUES%>);If the key is not provided, it is retrieved from the sequence: select currval('<&SELF:SERIAL_SEQ&>'); | |
| $NEW_KEY | A new primary key - if provided. | ||
| $FIELDS | List of field names: field1, field2, ... | ||
| $FIELDS_INSERT | A hash of the field names with their values. The $FIELDS, $VALUES and $LIST_VALUESare extracted from the$FIELDS_INSERT. | ||
| $VALUES | A list of question marks: ?,?,... | ||
| $LIST_VALUES | An array of values $LIST_VALUES->[n]used during$sth->execute();The list can be modified. | ||
| UPDATE | Update an existing record. The method is called from Array2UpdateSql() function where it is handled similarly to the INSERTmethod. Prior to the insertion it is checked whether the DELETE_IF_FIELD_EMPTY method must be handled. | update <&SELF:SCHEMA_FROM&> set <%$UPDATES%> where <&SELF:KEY&> = <% encodeSql($KEY) %>; | |
| $UPDATES | A list of fields to be updated: field1 = ?, field2 = ?, ... | ||
| $FIELDS_UPDATE | A hash of the field names with their values. | ||
| $LIST_VALUES | An array of values $LIST_VALUES->[n]used during$sth->execute();It can be modified. | ||
| $KEY | A primary key. | ||
| DELETE | Delete a record. The method is called from Array2DeleteSql()function, from thedeletemethod and also during handling of theUPDATEquery.Examples of the overloaded DELETEmethod can be found in:/opt/masonsql/htdocs/data/public/anagrafiche.mql,/opt/masonsql/htdocs/data/public/funzioni.mqlfiles. | delete from <&SELF:SCHEMA_FROM&> where <&SELF:KEY&> = <% encodeSql($KEY) %>; | |
| $KEY | A primary key. | 
.mql files, many examples of their use can be found in the /opt/masonsql/htdocs/ directory tree. 
| Group Name | Method Name | Arguments | Description | 
|---|---|---|---|
| PRE_ | The PREmethods are called before the main query is executed. | ||
| PRE_INSERT | |||
| $FIELDS_INSERT | Is a hash pointer. The $FIELDS, $VALUES and $LIST_VALUESare extracted from the$FIELDS_INSERT. | ||
| $DUP_KEY | $Params->{'dup_key'} | ||
| $PARAMS | A parameters for the prepared query must be added to the \%params | ||
| PRE_UPDATE | The PRE_DELETE,DELETEare also called just beforePRE_UPDATEif any of the fields from DELETE_IF_FIELD_EMPTY is to be updated with an empty value. | ||
| $KEY | A primary key value. | ||
| $FIELDS_UPDATE | Is a hash pointer. The $UPDATES and $LIST_VALUESare extracted from the$FIELDS_UPDATE. | ||
| $PARAMS | A parameters for the prepared query must be added to the \%params | ||
| PRE_DELETE | |||
| $KEY | A primary key value. | ||
| $PARAMS | A parameters for the prepared query must be added to the \%params | ||
| POST_ | The POSTmethods are called after the main query was executed. | ||
| POST_INSERT | |||
| $KEY | A primary key value. | ||
| $DUP_KEY | $Params->{'dup_key'} | ||
| $ROW | A contents of a record. | ||
| $FIELDS_INSERT | Is a hash pointer. | ||
| $PARAMS | A parameters for the prepared query must be added to the \%params | ||
| POST_UPDATE | |||
| $KEY | A primary key value. | ||
| $ROW | A contents of a record. | ||
| $FIELDS_UPDATE | Is a hash pointer. | ||
| $PARAMS | A parameters for the prepared query must be added to the \%params | ||
| POST_DELETE | |||
| $KEY | A primary key value. | ||
| $PARAMS | A parameters for the prepared query must be added to the \%params | ||
| POST_NO_ | The POST_NOmethods are called when the main query was not executed. | ||
| POST_NO_INSERT | |||
| $KEY | A primary key value. | ||
| $DUP_KEY | $Params->{'dup_key'} | ||
| $ROW | A contents of a record. | ||
| $PARAMS | A parameters for the prepared query must be added to the \%params | ||
| POST_NO_UPDATE | |||
| $KEY | A primary key value. | ||
| $ROW | A contents of a record. | ||
| $PARAMS | A parameters for the prepared query must be added to the \%params | ||
| POST_NO_DELETE | |||
| $KEY | A primary key value. | ||
| $PARAMS | A parameters for the prepared query must be added to the \%params | 
.mql files.| Method Name | Arguments | Description | Default Contents | 
|---|---|---|---|
| DELETE_IF_FIELD_EMPTY | Contains a list of field names. Defines which field causes execution of PRE_DELETE and DELETE on the specified row prior to UPDATE, when the field is empty. | By default the method does not exist. | |
| ENTITY_CHILDREN | |||
| ENTITY_FIELDS | |||
| ENTITY_RELATIONS | |||
| DB_LOG | Add variations to logs table | ||
| $type | update type (insert, update, delete) | ||
| $id | record id (PK) | ||
| $fields | hash of modified fields | ||
| $old_fields | hash of original fields | undef | |
| $table_name | table name (with schema) | undef | 
| Name | Arguments | Description | 
|---|---|---|
| Array2UpdateSql() | The subroutine is used for updating or inserting records sent by GUI in an array format. The array is passed from gotoRecordsmethod from thelib/databinding.jsin theupdateparameter and it contains only record-sets of changed or inserted fields. The record-set exchanged between a server and a browser are in a array format with the Primary Key in the first column and fields in the same positions as defined with theFIELDSmethod from the.mqlfile. | |
| Call_OutFieldFilter() | See the _OUT_FILTER method. | |
| Call_InFieldFilter | If the _IN_FILTERmethod is defined, applies the filter to the specified field. | |
| EvalSqlWhere() | ||
| ExecQuery() | ||
| PrepareQuery() | ||
| SelectWhere() | ||
| SqlSelect() | ||
| SqlWhere() | ||
| str2sql_js_delimited() | It returns a string adapted to be inserted into a SQL query, or to be inserted in a JavaScript code. | 
| Method Name | Description | Default Contents | 
|---|---|---|
| xls | Is the method that is called when user presses the XLS button. Its default behavior can be changed with SELECT_XLS,SELECT_XLS_FIELDSandTYPE_FIELDS_XLSmethods. | The method exports currently displayed table into the .xlsfile.The Xlspermissions relate specifically to this function. | 
| SELECT_XLS | A select query that configures SqlSelect() subroutine from the xlsmethod. | <%method SELECT_XLS> | 
| SELECT_XLS_FIELDS | A list of select fields for the query from the xlsmethod. The list configures SqlSelect() subroutine. | <%method SELECT_XLS_FIELDS> | 
| TYPE_FIELDS_XLS | A list of field types in the XLS table. If the method is not defined the xlsmethod tries to obtain field types from the database.(In old release <= 1.9.1, inclusive in the initial position with the format (number) of the primary key) | Not defined. | 
| Method Name | Parameter Name | Description | Default Value | 
|---|---|---|---|
| FORM_TYPE | TABLE,DIVS,FORM,TEMPLATEorLINEAR, see also frame.html. | FORM | |
| FORM_HEADER | The method shows the header bar which displays the methods in this order: The CONTROLSmethod,HEADER_INCLUDEmethod and the DESCRIPTION method. | Empty method. | |
| HEADER_INCLUDE | Displays additional fields in the table header. Used by the FORM_HEADERmethod. | ||
| TABLE | The generic method which displays records in a table. | ||
| TABLE_HEADER | The generic method which displays the table header. | ||
| TABLE_ROWS | Number of rows in TABLEor inDIVSform. | ||
| ROW_TABLE | The generic row method for browsing the table with TABLEmethod. Used only byTABLEmethod. | ||
| DIVS | The generic method which displays records in rows but without table header. | ||
| ALL_ROW_DIVS | |||
| ROW_DIVS | The generic row method for browsing the DIVStype of table. Used byDIVSandALL_ROW_DIVSmethods. | ||
| SEP_DIV | The <div>separator. Used only byDIVSmethod. | <hr> | |
| FORM | The form method displays one record at a time. | ||
| LINEAR | The generic form method with a linear format for browsing the database table. In this format the fields are sorted in the order in which they were listed. To interrupt a line insert the character /at the bottom of the field description. | ||
| TEMPLATE | The generic form for browsing the database table. The fields are inserted into the template with the provided FORM_TEMPLATEmethod(or with parameter $Template).For example: <%method FORM_TEMPLATE><p><DESCR:description>:<FIELD:description></p></%method>See also FATHER_TEMPLATE,CHILDREN_TEMPLATEandCHILD_TEMPLATEin frame.html. | ||
| FORM_TEMPLATE | The generic form for browsing the database table. Display or edit single record at a time. For example: <%method FORM_TEMPLATE><p> | ||
| DIVS_TEMPLATE | The generic method for browsing the database table. Display or edit multiple records at a time. For example: <%method DIVS_TEMPLATE>Rec: <RECORD><CHECKBOX><DESCR:par_id>:<FIELD:par_id><DESCR:cod>:<FIELD:cod><DESCR:unit>:<FIELD:unit><DESCR:prezzo>:<FIELD:prezzo><DESCR:rifer>:<FIELD:rifer> | ||
| ROW_DIVS_TEMPLATE | The generic row method for browsing the table with DIVS_TEMPLATE.Used only by DIVS_TEMPLATE. | ||
| GENERIC_FIELD | |||
| GENERIC_D_FIELD | |||
| BOOL_FIND_FIELD | |||
| STANDARD_FIELD | |||
| FIELD_ROW_DIVS | DEPRECATED: Its beavior to permit to view in GUI a variable number of rows modified by GUI with preloaded templates. The beavior is activated with FIELD_ROW_DIVS method (name of field record that determining the type of line in the case of type DIVS template variables). | 
| Method Name | Parameter Name | Description | Default Value | 
|---|---|---|---|
| CONTROLS | The method shows the control bar with refresh, navigation, modify, delete, save and the rest of the control buttons. The enabling of the buttons depends on the configuration but can also be individually passed to the frame.html. | ||
| $disp_navbar | Display control bar. | 1 | |
| $disp_cancel | Display Annullabutton. | 1 | |
| $disp_refresh | Display Aggiornabuttton. | 1 | |
| $disp_change | Display Modificabutton. | 1 | |
| $disp_insert | Display Nuovobutton. | 1 | |
| $disp_dup | Display Duplicabutton. | 0 | |
| $disp_save | Display Salvabutton. | 1 | |
| $disp_delete | Display Cancellabutton. | 1 | |
| $disp_print | Display Stampabutton. | 1 | |
| $disp_xls | Display XLSbutton. | 1 | |
| $disp_log | Display LOGbutton. | 1 | |
| BUTTON_Ctrl_filter | The Filtrabutton in the find bar. | Calls loadRecords('rewind') | |
| BUTTON_Ctrl_printsel | The St.selbutton in the find bar. | Calls printSelected('recordset') | |
| BUTTON_Ctrl_xlssel | The XLSbutton in the find bar. | Calls printSelected('xls_recordset') | 
pdf query request (see Testing Queries). DisplayBinding object. printSelected() uses the printUrl() function, from DataBinding object, to construct query request url with attached parameters.
| Method Name | Parameter Name | Description | Default Value | 
|---|---|---|---|
| pdf | The method wraps around the PDF method. The method gets $GROUP_IDand$report_idsby callingSqlSelect2report_id()and passes them to thePDFmethod. Afterwards, when thePDFreturns, it removes all$GROUP_IDrecords frompublic.report_idtable withdelete print groupquery. | ||
| PDF | Prepares the parameters for the report.pdf component. | ||
| $GROUP_ID | Is simply passed forward. | Not defined. | |
| $report_ids | It's checked if the REPORT_IDargument exists which overrides the$report_ids. TheREPORT_IDcan be defined defined in theODT Reportsas one of thecmd_parametersthat are used for testing ODT reports. Then the$report_idsis passed forward to thereport.pdfcomponent. | Not defined. | |
| $LANDSCAPE | If it finds $LANDSCAPEparameter in a list of parameters it is discarded. | Not defined. | |
| $report | The parameter represents name of the report file used by the Reportman or ODT Reportman to generate the report. | Not defined. | |
| $report_method | The report method is determined by the ReportMethod() subroutine. Valid values are: rep,odtorpdf. | None. | |
| $report_file | The $report_fileis used by the Reportman. The value is determined by the FindReportmanFile() subroutine. | ||
| PRINT_FORM | Schema/form_name to be used for the report with attached orientation. See the button example.  | <%method PRINT_FORM>\  | |
| PRINT_RECORDS | The method inserts the primary key of the public.recorsettable and thegroup_idin thepublic.report_idtable. | ||
| $WHERE | Empty string. | ||
| $GROUP_ID | Not defined. | 
| Subroutine Name | Parameter Name | Valid Input Value | Description | 
|---|---|---|---|
| Array2report_idSql() | Inserts each key from the $arrlist into thepublic.report_idtable. Returns$group_idand$report_ids. | ||
| $group_id | Group ID. | ||
| $arr | A list of parameters. | ||
| FindReportmanFile() | Uses request_to_comp_path() subroutine with different combinations of the parameter $reportand the Apache config variable ReportmanADOserver to find the right Reportman configuration file. | ||
| $report | The report name. | ||
| ReportmanADOserver | If this Apache configuration variable exists the subroutine searches for and validates the Wine report configuration files. Otherwise the subroutine searches for and validates the Kylix report configuration files. | ||
| ReportMethod() | Analyzes the report name to determine which reporting method is used (Reportman or ODT Report. The subroutine first tries to determine the reporting method from the $reportsuffix. If there is no suffix present it uses the value of the Apache config variable DefaultReportEngine. If it finds unknown report suffix or if theDefaultReportEngineis not defined it raises an error. | ||
| $report | The report name. Optional suffix determines the reporting method. See the button example to understand how the $reportname is constructed. | ||
| my_report_name.rep | The report will be created with the Report Manager and printed in .pdfformat. | ||
| my_report_name.odt | The report will be created with the ODT Report and printed in .odtformat. | ||
| my_report_name.pdf | The report will be created with the ODT Report and printed in .pdfformat. | ||
| NewGroupId() | Uses Apache config variable PrintNextValQueryto obtain new group ID value.By default, if the config variable is missing, it uses select nextval('public.report_id_id_seq')query. | ||
| SqlSelect2report_id() | It uses the NewGroupId()to get a new$group_idvalue. Initializes thereport_idtable with the IDs of the records to be printed. Returns$group_idand$report_idsto be passed as parameters to thePDFmethod. The returned parameter$group_idcontains a$GROUP_IDvalue. The returned parameter$report_idscontains a reference to an array of a$REPORT_IDvalues. | ||
| $Params->{'reportlist'} | If the reportlistparameter is defined the function returnsArray2report_idSql() | ||
| $Params->{'type'} | Otherwise, if the reportlistparameter is not defined, the$Params->{'type'}is set torecords | ||
| $Params->{'where'}and$Params->{'numrec'} | Both parameters are used for making SqlSelect2report_id numrecquery.The result of the query is saved to $SQL{MAX_ROWS} | ||
| $Params->{'where'} | Is also used for making SqlSelect2report_id printquery. | 
| Method or Subroutine Name | Parameter Name | Valid Input Value or Attribute Value | Description | Default Value | 
|---|---|---|---|---|
| Find_Component() | Returns the name of the component to be used in the search field. It first seeks for _FIND_FIELD, _FIND_ALIAS, _ALIAS, _FIELD methods. | If component is not found it returns BOOL_FIND_FIELDorSTANDARD_FIELD. | ||
| INFO | Retrieves information from a .mqlfile and from a database table.It is cached in global hash $Global{"ATTRS_<SCHEMA>_<TABLE>"} | |||
| NAME | The INFOmethod will retrieve all fields parameters or parameters of one field with parameterNAME. See also FIELDS method. | |||
| TYPE | Data type of the field ( integer,float, ...)The parameter limits the response to the requested type of query. | |||
| SIZE | The field size in digits. | |||
| DECIMAL | Decimal size of the field. | |||
| NOTNULL | The field is not null-able; See also FIELDS_NOT_NULL method. | |||
| PRIMARY_KEY | The field is a primary key. | |||
| DESCR | Use description from the FIELDS_DESCR method. | |||
| FIND_DESCR | Use description from FIND_FIELDS_DESCR method. | |||
| HIDDEN | The field is not visible. Non-visible fields are defined with FIELDS_HIDDEN method. | |||
| List2Array() | Converts an input string into an array using input separator. | |||
| $list | Input string. | |||
| $sep | Input separator. | The default separator is , | ||
 Crea Nuova Pagina
 Crea Nuova Pagina
 Indice
 Indice
 Cerca
 Cerca
 Variazioni
 Variazioni
 Notifiche
 Notifiche
 Feed RSS
 Feed RSS
 Statistiche
 Statistiche
 Preferenze
 Preferenze
 SVN Repository
 SVN Repository
 Copyright (©) Leader.IT - Italy P.I. IT01434390223 Informativa privacy & uso dei cookies
Copyright (©) Leader.IT - Italy P.I. IT01434390223 Informativa privacy & uso dei cookies