Scripts, reports
The structure of the Administrator module includes the Scripts, reports book, which displays all reports, scripts and forms available in IS K2. These are resources stored in the database.
When running, standard resources take precedence over special ones. Likewise, database scripts and reports take precedence over scripts in the file system when running.

Picture: Scripts, reports - book
In the left part, Folders, the user can choose whether to display all resources or only a selected type. New reports or scripts are inserted into the book with the Ins key and are always marked as special.
Description of columns:
C |
In this column, icons identify whether the resources are certified:
|
C |
In this column, the |
R |
If the Note: If the user logs in with the system password, the |
E |
If the record has the |
O |
If this script does not have the Note: After deletion, the record remains in the database, but the code is actually deleted. |
D |
If we select (with the Shift+F4 keys) a script that has an icon in the "P" column, the |
S |
The |
Keyword |
On the 1st page of the record, a keyword can be entered, which can be used for filtering. |
Abbr |
Unique identifier of the resource. |
File type |
Identifies the type of the file, whether it is a script, a report or a form. Note: If it is a so-called "unit", it has no icon in the "P" column and "script" is shown as the file type. |
Description |
A more detailed, user-editable description of each record. |
Description of function keys:
F7 |
Verifies the certificate, and an icon is inserted into the "C" column indicating whether the certificate is valid, invalid or missing. |
Alt+F2 |
Saves the selection of records (Shift+Enter) to the user directory. |
Alt+F3 |
Registration of resources for print reports. |
Alt+F5 |
Opens the report (or script) in the editor. |
Alt+F9 |
Compiles the scripts and reports in the selected directory and its subdirectories. Scripts marked AS3Compatible are also compiled using AS_Developer. If a script or report cannot be compiled, the reason is saved to the file "jmeno_skriptu.err" in the SestavyW directory. For command-line compilation, function 712 was created, described in the technical manual. |
Ctrl+F2 |
Loading of saved records (see Alt+F2). |
Ctrl+F5 |
Opens the report (or script) in the editor. |
Ctrl+F9 |
A compilation test is performed (only for records that have an icon in the "P" column). The resource is compiled and either the program reports a compilation error, or the test passes successfully. |
Shift+F3 |
Clears the script cache. |
Shift+F4 |
Marks/unmarks the resource for debugging; when this resource is run, it opens in the script editor. |
F7 + Ctrl+F9 |
The certificate check and compilation test are performed not only on the current record but also on the selected records. |
Ctrl + F |
Runs the Search in resources function. |
Search in resources function
The function searches for text in the source code of scripts/reports/forms and filters the records that contain the given text.
The function can be run either from the ribbon on the Home - Quick options tab, or using the CTRL + F keyboard shortcut. After it is run, a filtering form is displayed. The searched text is entered in the Source code field, and the Type.Abbreviation field is used to select whether to search the resources of scripts, reports or forms. The OK button starts the search and subsequent filtering.

Picture: Search in resources
Scripts, reports - Basic data

Picture: Scripts, reports - Basic data
Description of fields:
Abbreviation |
Unique identifier of the resource. |
Number |
Unique identification number. |
Type |
Identifies the type of the file, whether it is a script, a report or a form. |
Special |
If this field is checked, it is a special resource. When inserting a new script, this field is checked automatically. |
Changed by |
Date of the last saved change and the name of the user who made the change. |
Description |
A more detailed, user-editable description of each record. |
Created by |
Date of creation of the record and the name of the user who created the record. |
Key word |
Here we enter a keyword that can be used for filtering. In Change mode, pressing the |
Read only |
If this field is checked, the resource cannot be edited. |
Executable only |
If this field is checked, the source code is not displayed to the user. (It is used mainly for standard resources.) |
Unclassifiable |
Reports or scripts with this option checked cannot be included among reports (F9). |
Custom |
If a new report or script is inserted by a user, this field will always be checked (and on page 0 there will be the |
The lower window displays a preview of the report or the source code, which can be edited in certain cases.
Functions in the Scripts, Reports book
On the List tab of the Scripts, Reports book, we can perform the following actions:

Picture: Actions in the Scripts, reports book
Exports
Export into package |
This function can be used to export script or report files into a package. Reports and scripts marked with
Picture: Form for package export
|
Export into file |
The function is used to export files of special reports and scripts. Reports and scripts marked with |
Imports
Import package |
This function can be used to import a package of script or report files into the K2 system. The package carries information on whether it is to be imported into standard or special files. After the function is run, the Import package form opens, in which we select the file we want to import. The file must have the *.BPK extension. We 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. Running the function opens the Browse for folder form. The selected folder must contain files of the *.PAS, *.AM, *.DFM types. |
Import files |
This function imports the same types of files as the Import from directory function. However, these files are imported individually. After selecting the function, the Import from package form opens. Here we select the files we will import. |
Blocking and deleting special reports and scripts
Block script |
F8 |
Marks the current record or the selected records as deleted ( |
Delete script content |
|
Deletes the contents of the current or selected records. Contents can be deleted only for blocked scripts / reports ( |
Block and delete content |
Ctrl+F8 |
Marks the current record or the selected records as deleted ( |
Delete script record |
|
Completely deletes the current or selected records from the database. Only blocked records ( |
Allow script |
Shift+F8 |
Makes already blocked records valid again. |
button opens the code list from which we select the keyword and confirm the selection.