Scripts, reports
In module Administrator there is a book called Scripts, reports, where you can find all reports, scripts and forms, which are available in K2 IS. It deals with resources in database.
Standard resources have been preferred before the special ones. The same as databases scripts and reports, they have the priority before scripts in a file system upon running.
Picture: Scripts, reports - book
In the left part of the List of files the user can choose whether wants to see all resources or just one type. You can add new reports or scripts by means of Ins key into a book and they are signed as a special one.
Columns Description:
C |
In this column it is identified by means of icons if the resources have been certified: - certificate is valid, - certificate of resources code has not been verified (verification by means of F7), - resource code has been changed, but has not been certified. It means the script is not able to run. |
P |
In this column, the icon indicates a program or report (executable code that can be inserted into the print function (F9)). |
R |
If the icon is displayed in this column, the currently logged in user does not have the right to change the report or script. Note: If the user logs in with the system password, the icon will not be displayed and the user can change reports or scripts. |
E |
If the record has an icon , this standard script is protected, the source code is not displayed, and therefore changes cannot be made to it. |
O |
If this script does not have an icon in the "R" column, the user can delete the record. The icon will be displayed indeleted record in "O" column Note: The record has stayed in database after deletion, but the code has been really deleted. |
D |
If you sign the script (by means of Shift+F4), which has the icon in column "P", the icon will be inserted into this "D" column This icon indicates that the source code will be displayed in the script editor at runtime. It is mainly used for registered functions. |
S |
Icon signs a special one (added by a customer) in this column. If icon has been displayed in this column , it deals with special script added by a consultant. |
Keyword |
On 1. page it is possible to add a keyword, which is able to use for filtering. |
Abb. |
Unique identifier of resource. |
File type |
Identifies what type of a file it is. If it is a script, report or a form. Note: If it is a "unit", it does not have an icon in "P" column and it is "script" as a type. |
Description |
Closer user-changing description of every record. |
Keys Description:
F7 |
Verifies certificate and the icon will be added into "C" column. It verifies if it is valid, invalid or none. |
Alt+F2 |
Saves records signing (Shift+Enter) into a user directory. |
Alt+F3 |
Registration of resources for print reports. |
Alt+F5 |
Opens report (also script) in editor. |
Alt+F9 |
Makes translation of reports and scripts in selected directory and its sub-directories. Scripts signed by AS3Compatible are translates by means of AS_Developer as well. If script or report is not able to be translated, the reason is saved into a file "name_script.err" in file ReportsW. The function 712 that was described in technical guide, has been created for line translation. |
Ctrl+F2 |
Loads saved records (see Alt+F2). |
Ctrl+F5 |
Opens report (also script) in editor. |
Ctrl+F9 |
Makes test of compilation (just for records that have icon in "P"column). Makes translation of resources and either the program announces the error or the test is correct. |
Shift+F3 |
Clear cache scripts. |
Shift+F4 |
Sign/Sign off resources for debugging and upon running of this recourse it causes opening in editor of scripts. |
Ctrl+F9 |
Checks certificate and test of compilation will be done not just for current record, but also for signed records. |
Scripts, reports - 1st page
Picture: Scripts, reports - 1st page
Fields Description:
Abbreviation |
Unique identifier of resource. |
Licence |
In this field, the number of the module that has the specified number of licenses is entered (see the description of Modules). Entered scripts have "0" specified by default. |
No. |
Unique identification number. |
Type |
Identifies what type of a file it is. If it is ascript, report or a form. |
Special |
If this box is checked, it is a special resource. When inserting a new script, this field is checked automatically. |
Changed |
The date of the last saved change and the name of the user who made the change. |
Description |
Closer user-changing description of every record. |
Created by |
The date the record was created and the name of the user who created the record. |
Key word |
Here we insert a keyword that can be used for filtering. In the Change, press the button to call up the code list, from which we select the keyword and confirm the selection. |
Only for read |
If this box is checked, the source cannot be edited. |
Just executable |
If this box is checked, the source code will not be displayed to the user. (It is mainly used for standard resources.) |
Unclassifiable |
Assemblies or scripts with this check mark cannot be included in assemblies (F9). |
Customer |
If the user inserts a new report or script, this field will always be checked (and there will be an icon on the 0th side of the "S" column). |
The lower window displays a preview of the report or source code, which can be edited in certain cases.
Functions in Reports book
On 0. page in the Scripts, Reports book, we can perform the following actions:
Picture: Open menu in Scripts, reports book
Package import
This feature can be used to import a package of script or report files into the K2 system. The package carries information on whether it should be imported into standard or special files. After starting the function, the Import package form will open, in which we will select the file we want to import. The file must have the extension * .BPK. We will confirm the selected file and upload it.
Import from directory
The function is used to import files for special reports and scripts into the K2 system. Run the function to open the Find Folder form. The selected folder must contain files of type * .PAS, * .AM, * .DFM.
Files import
This function imports the same file types as the Import from Directory function. However, these files are imported individually. After selecting the function, the Import from package form will open. Here we select the files to be imported.
Export to package
Use this function to export script or report files to a package. Reports and scripts that are marked are exported. After running the function, the Export to package form will open, in which we will name the file and choose the path where the file will be exported. The file will have the extension * .BPK. We confirm selected file. The form opens:
Picture: Form for package export
Fields Description:
Compile |
Checks the correctness of the exported files. |
Certificate |
Certifies exported files. |
Export Deleted |
It also exports files that are marked as deleted . When imported, these files are then marked as deleted. |
Export to file
The function is used to export files of special reports and scripts. Reports and scripts that are marked are exported. After selecting the function, the Find folder form will open. Enter the file name and select the folder to which we will export.