Macros list |
Macros list allows to increase functionality at operations with the user's forms. Properties of a component are the followings: Name - contains a name (identifier) of a component, by which the call to this component is effected. Macros list - is used for call of the Macroses editor. Using Macroses editor it is possible to do the followings: - To rename a macros name; - To add a macros; - To delete a macros. Macros with a name Form_macros1 is automatically added at pressing Add button in Macroses editor. For this macros it is necessary to select the Macros type in Object inspector. Macros type defines execution of definite operations: - Call of the geocoding form (GEOCode form call). - Dataset report. - Run application. - Open a map. - Save dataset to file. - Place point objects. - Create filter. - Create query. - Turn On/Off filtering. - Open dataset. - Close dataset. - Map calculation. - Create parameterized filter. - Write form name. - Run Dll. - Open form from table. - RunExe (run application with parameters from the table). Each type of a macros has its own set of properties. Macros "GEOCode form call" has properties: - Dataset name - defines the reference onto a component's name "Table" (or "Query"), which provide link with a concrete set of the information from a DB; - Name - contains a name (identifier) of a macros, by which the call to this macros is effected. - Macros type - defines execution of definite operations. Macros "Dataset report" has properties: - Report template file name - filename of the template created and tuned beforehand in Microsoft Office. Reports creation is executed by Microsoft Office resources (for templates with XLT extension - MS Excel, with DOT extension - MS Word). The document template consists of a descriptive part, which automatically is not edited, and of data fields (key fields), which are substituted onto appropriate to them values from the table during creation of the report. The data fields represent names of table fields as a set of capital letters limited by characters "#". For example, NUMBER is the name of a table field, # NUMBER # is the name of data field in the template. Report type - indicates the type of the created report and can accept values: Excel total - report for all records (by default), Excel one - report for current record, Word one - report for current records, by template type. The reports can be of two sorts: - The tabular report can be created only on the basis of the template MS Excel and contains data as the table. In the first string of the report template where it is necessary to begin print of the data as the table the names of data fields should be enumerated. As the example the tabular report on the basis of the template with name "ExExcel.xlt" is delivered. - The report by form represents the document in which the names of data fields are set in any place, selected by the user, and they can repeat. The report by form is created on the basis of the template MS Word or MS Excel. As the example the tabular report on the basis of the template with name "ExWord.xlt" is delivered. - Dataset name - defines the reference onto a component's name "Table" (or "Query"), which provide link with a concrete set of the information from a DB. - Name - contains a name (identifier) of macros, by which the call to this macros is effected. - Macros type - defines execution of definite operations. Macros "Run application" has properties: - Application file name - is indicated a filename with the "*.exe" extension, which is selected with the help of the standard dialogue of file choice; - Name - contains a name (identifier) of macros, by which the call to this macros is effected. - Macros type - defines execution of definite operations. Macros "Open map" has properties: - Dataset name - defines the reference onto a component's name "Table" (or "Query"), which provide link with a concrete set of the information from a DB; - Name - contains a name (identifier) of macros, by which the call to this macros is effected. - Macros type - defines execution of definite operations. - Map name field, X field name, Y field name - contain names of appropriate fields. - Coordinate type - indicates a coordinate system and can accept values: meters, degrees, radians. Macros "Save dataset to file" has properties: - Dataset name - defines the reference onto a component's name "Table" (or "Query"), which provide link with a concrete set of the information from a DB; - Name - contains a name (identifier) of macros, by which the call to this macros is effected. - Macros type - defines execution of definite operations. Macros "Place point objects" has properties: -- Dataset name - defines the reference onto a component's name "Table" (or "Query"), which provide link with a concrete set of the information from a DB; - Name - contains a name (identifier) of macros, by which the call to this macros is effected. - Macros type - defines execution of definite operations. - Map name field, X field name, Y field name, H field name - contain names of appropriate fields of the table. - Coordinate type - indicates a coordinate system and can accept values: meters, degrees, radians. - Link flag - if it needs to install link of the created object with database table record appropriate to it. At the further operations with database the placed link allows to find by record in the table the appropriate to it object or, on the contrary, by the object to find the record. Macros "Create filter" has properties: - Filter form type - indicates the form type of installed filter and can accept values: advanced template, simple template. The search of records in the current data table is executed by creation of the query text by user and filtering of the data by query. After the query execution only those records will be browsable and editable which satisfy to given conditions. - Dataset name - defines the reference onto a component's name "Table" (or "Query"), which provide link with a concrete set of the information from a DB; - Name - contains a name (identifier) of a macros, by which the call to this macros is effected. - Macros type - defines execution of definite operations. Macros "Create query" has properties: - SQL query - defines the reference onto a component's name "Query", which provide link with a concrete set of the information from a DB; - Name - contains a name (identifier) of a macros, by which the call to this macros is effected. - Macros type - defines execution of definite operations. For execution of a macros it is necessary to place on the form together with a component "Macros list" the Button component and for its Macros name property to select required one from the list. Creation example of the user's form with usage of a component " Macros list". n of all records, for which one value of fields preset obviously: SEM9 is equal to 'Filling station 1' and field EXCODE = 51220000, and for the second expression the value of fields are set with the help of components 'Value_edit' and of component 'Operator_combobox' . At the moment of filter activation instead of name of the parameter-variable the concrete value from a corresponding component of the form is substituting. For creation of the second expression it is necessary, that the user's form contained components 'Value_edit' and ' Operator_combobox '. To create the given expression in the Filter editor, select the field name and "drag" it into the window of the filter text, further enter the comparing operation. Select and "drag" the name of a component for input of values, choice of the operator and etc. The name of a field will be written down without square brackets, if at carry to hit the <Shift> key. For activation and deactivation of a filter the macros "Turn On/Off filtering" will be used. For creation of the form it is necessary to execute following operations: 1. Press Add button in bookmark "User form" of Base Administrator. Form constructor will be actuated. 2. To create a new form (command Form / New, or having selected Create button). 3. To place the component "Table" (or "Query") on the form and to customize it. 4. To place the component "Macros list" on the form. And farther it is necessary to execute following operations with help of the specialized Macroses editor of the component (which you can call out through a value's field of property - object "Macros list" in Object inspector): - To add a macros; - To set a data set, name, to select the macros type - Dataset report; - To select the report type and report template file name(optional parameter); - To rename a macros, for more visual and friend usage. For example, let's replace a name "Form_macros1" onto "Report_macros"; - To click the Close button of Macroses editor. 5. To place Button component on the form. Set the "Report_macros" value to Macros name property. 6. To save the created form.
|