8 Results and Reports: 8.1 Results of A Calculation
8 Results and Reports: 8.1 Results of A Calculation
8 Results and Reports: 8.1 Results of A Calculation
Then define the new parameters or values that are to be added. These values then also appear at
the end of the "Results" window.
The syntax corresponds exactly to the entries for the report templates.
A calculation module can contain further reports which you can access via the Report menu.
Reports are usually displayed in the KISSsoft Report Viewer (see chapter 4.4.1, Report Viewer).
Important: The report is not saved when you return from the report viewer to the input window. To
make it permanently available, you must save it with a new name!
Note
In general, a report should only be created if the calculation is consistent (see chapter 5.3,
Calculating and generating a report). If this is not the case, you can still generate the report, but the
status of the calculation will then be noted in the report.
I Results and Reports 92
Note
When you generate a standard report, the system generates a report file with the module's label as
its file name. The file is saved in the directory defined as the TEMPDIR (see chapter 2.6, Global
settings - KISS.ini) in the KISS.ini file (see chapter 2.6.1, Definitions in [PATH]).
8.4.1 General
Here you define the scope of the report (see chapter 8.5.2, Scope of a report) and whether warnings
from the calculation are to be included in it. You can also set the font size, language and the
standard format used to save reports.
If a report is generated, and a previous report is still open, the data will be updated. The cursor in the
editor will remain in the same line it was in before this. This feature will help you analyze specific
values using different inputs.
In the report settings, change the report mode to "compare" if you need to compare two or more
reports at a time. This mode can only by set if you are using KISSedit as the editor. You can also
synchronize the reports and scroll through them all at the same time.
You can also set these report settings directly in the KISS.ini file.
Placeholder Description
%date Dated
%time Time
%t Tab
The %logo placeholder uses the selected graphics file to integrate a user-defined logo (company
label). The date and time are output in accordance with the details specified under Extras >
Settings.
Commands that can be used in these templates and what they mean:
Command Description
I Results and Reports 94
DATE Date (select "Extras > Settings" and then set your preferred output
format.)
TIME Time (select "Extras > Settings" and then set your preferred output
format.)
being overwritten if a patch is installed. When the system generates a report, it uses the user-defined
template from the EXTDIR directory, if present. Otherwise it uses the template from the RPTDIR to
create the report.
The report template labels have this structure: MMMMlsz.rptIt is made up of:
Examples
Bolt calculation:
American printout:
Example: If you entered 5 (medium) as the report length, all the lines in the report template that start
with 1, 2, 3, 4 or 5 are read. Rows with 6, 7, 8 and 9 will be not read.
8.5.3 Formatting
Both the report template and the report generated from this are text files that are created with the
Microsoft Windows font. You should always edit text in MS Windows, otherwise accented characters
such as ä, ö, ü, as well as some special characters, may be represented incorrectly.
The following statements and key words are defined in the report format:
8.5.3.2 Comments
Comment lines begin with //. Comments are ignored when a report is created.
Example
You cannot define your own variables (apart from the number variables used for FOR loops (see
chapter 8.5.3.5, FOR loop), which you (as the user) specify, and which can output a value.
Placeholder
Use placeholders to specify the file type and formatting for a variable:
1. 2f stands for a formatted floating point number with 1 places in total (including prefix
operator and decimal separator) and 2 decimal places
%s stands for a left-justified character string (text)
%ns stands for a right-justified character string in a n- number field (n is a whole number).
The data types must match the definition in the program. The value is returned in exactly the place
where the placeholder is positioned. The syntax of the formatting corresponds to the C /C++standard.
Examples
%10.2f returns a right-justified 10-digit floating point number, with 2 decimal places.
%ireturns an unformatted whole number in exactly this location.
%30s stands for a right-justified character string in a field that is 30 characters long (if the
number 30 is omitted, the characters will be left justified).
Counter-examples
Variables
The variable to be displayed must stand after the placeholder in the same row. The variable is
identified by being enclosed in curly brackets. If these brackets are left out, the variable name will be
displayed as normal text.
Important: It is essential that the number of placeholders exactly matches the number of pairs of
brackets {}.
Example
%f {sheave[0].d} is the value of the variable sheave[0].d at the point %f as a floating point number with
6 decimal places.
You can output changed variables in the report. They can be multiplied or divided with a coefficient.
You can also add or subtract a number. This functionality is also available in the arguments of IF- or
FORinstructions (see below).
The two Degree and Gear functions are also available for converting variables to degrees or radians:
Variables can also be directly linked with each other, e.g. in the form {sheave[0].d- sheave[1].d}. More
than two numbers can be linked. Numbers that have sign operators must be enclosed in brackets, for
example {ZR[0].NL*(1e-6)}.
Function Meaning
abs(val) |val|
exp(val) eval
sgn(val)
Return value
sgn2(val)
Return value
celsius_f(val)
Return value val + 32
NOT(val)
Return value
LESS( 1; 2)
Return value
EQUAL( 1; 2)
Return value
GREATER( 1; 2)
Return value
Return value:
1 if str1 = str2
0 otherwise
8.1 table: Functions available for calculations in the report
The condition query or branching enables you to output certain values and texts only if a particular
condition has been fulfilled. The following conditions are supported:
= equal