Book Contents

Book Index

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.

pic_1203_2024

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:

pic_340i - the certificate is valid,

pic_339i - the source code certificate has not been verified (it is verified with the F7 key),

pic_344i - the source code has been changed but is not certified, i.e. it will not be possible to run the script.

C

In this column, the pic_342i icon indicates a program or report (executable code that can be inserted into the print function (F9)).

R

If the pic_343i 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 pic_343i icon will not be displayed and the user can change reports or scripts.

E

If the record has the pic_345i icon, this standard script is protected, the source code is not displayed and therefore it is not possible to make changes to it.

O

If this script does not have the pic_343i icon in the "R" column, the user can delete the record. For a deleted record, the iconPIC_062i is displayed in the "O" column.

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 icon is inserted into this "D" column. This icon indicates that the source code will be displayed in the script editor at the moment of running. It is used mainly for registered functions.

S

The pic_341i icon in this column indicates a special (inserted by the customer). If there is the pic_346i icon in this column, it is a special script inserted by a consultant.

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.

pic_10222

Picture: Search in resources

Scripts, reports - Basic data

pic_1214_2024

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 pic_290i button opens the code list from which we select the keyword and confirm the selection.

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 pic_341i icon in the "S" column).

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:

pic_2313_2024

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 are exported. After the function is run, the Export into package form opens, in which we name the file and choose the path where the file will be exported. The file will have the *.BPK extension. We confirm the selected file. The following form opens:

pic_10441

Picture: Form for package export

 

  • Compile: Checks the correctness of the exported files.
  • Certification: Certifies the exported files.
  • Export deleted records too: Also exports files that are marked as deleted PIC_062i. On import, these files are then marked as deleted.

Export into file

The function is used to export files of special reports and scripts. Reports and scripts marked with are exported. After selecting the function, the Browse for folder form opens. We enter the file name and select the folder to export to.

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 (PIC_062i). The script / report code will not be deleted.

Delete script content

 

Deletes the contents of the current or selected records. Contents can be deleted only for blocked scripts / reports (PIC_062i).

Block and delete content

Ctrl+F8

Marks the current record or the selected records as deleted (PIC_062i) and erases their code.

Delete script record

 

Completely deletes the current or selected records from the database. Only blocked records (PIC_062i) can be deleted, and at the same time these records must have their contents (code) erased.

Allow script

Shift+F8

Makes already blocked records valid again.