Lorem ipsum dolor sit amet:

24h / 365days

We offer support for our customers

Mon - Fri 8:00am - 5:00pm (GMT +1)

Get in touch

Cybersteel Inc.
376-293 City Road, Suite 600
San Francisco, CA 94102

Have any questions?
+44 1234 567 890

Drop us a line

About us

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec.

Appendix B. Formula language

B. Formula language

ReportServer supports the input of formulas in many places. Formula expressions are always enclosed by the character string ${}. The actual expression is placed between the curly brackets. The Unified Expression Language (EL) standardized in JSR-245 ( and is used here.

Simple calculations and string functions can be used in formula expressions. For example, the expression ${3 + 5} calculates the number 8. Depending on the context, different objects/substitutions are available in expressions.

In addition to the basic arithmetic operations, the following mathematical operations are implemented:

math:random() Returns a random number between 0 and 1
math:sin(Double) Calculates the sine
math:cos(Double) Calculates the cosine
math:tan(Double) Calculates the tangent
math:abs(Double) Returns the integer value of a number
math:ceil(Double) Rounds up the transferred number
math:floor(Double) Rounds off the transferred number
math:round(Double) Rounds the transferred number
math:max(Double, Double) Returns the larger value
math:min(Double, Double) Returns the smaller value
math:pow(Double, Double) Returns the first value to the power of the second
math:log(Double) Returns the natural logarithm
math:exp(Double) Calculated high value
math:sqrt(Double) Returns the root
math:signum(Double) Calculates the Signum function

In addition to the methods of the Java string object, the following helper methods are available for processing character strings:

sutils:left(String, int) Returns the first characters of the string
sutils:right(String, int) Returns the last characters of the string

For conditional expressions, you can use the ternary expression operator

	Bedingung ? Ausdruck, falls wahr : Ausdruck, falls falsch

to use. The following expression provides

	${math:random() < 0.5 ? true : false}

returns a truth value. If the random number is less than 0.5 (this occurs in 50% of cases), TRUE is returned, otherwise false.

B.1.1 Work on Objects

If you have transferred an object via replacement, you can call methods on this object. The "today" object, for example, is available in filters or date parameters. To call a method of the object, write ${today.METHODENNAME()}. Today returns a date starting from the current date. However, if you want to select the first day of the current month, write ${today.firstDay()}. The following methods are available on the today object.

firstDay Sets the calendar to midnight of the first day of the current month.
lastDay Sets the calendar to the last second of the last day of the current month.
addDays Moves the calendar forward/back the specified number of days.
addMonths Moves the calendar forward/back the specified number of months.
addYears Sets the calendar forward/backward by the specified number of years.
setDay Sets the calendar to the specified day.
setMonth Sets the calendar to the specified month.
setYear Sets the calendar to the specified year.
clearTime Resets the time to midnight.
addHours Sets the calendar forward/backward the specified number of hours.
addMinutes Sets the calendar forward/backward by the specified number of minutes.
addSeconds Sets the calendar forward/backward by the specified number of seconds.
setHours Sets the time to the specified hour.
setMinutes Sets the time to the specified minutes.
setSeconds Sets the time to the specified seconds.
format This function converts the date into a text in the specified format. This is necessary in order to make comparisons on columns that are not of the date type (see table Date format in Appendix C.).

Example: You want to filter all invoices from the previous month. To do this, you can define the following inclusion filter:

${today.firstDay().addMonths(-1)} - ${today.firstDay().addSeconds(-1)}

InfoFabrik GmbH

We want all companies, institutions and organizations to gain independent and fast access to precisely the information they need for working successfully.

InfoFabrik GmbH
Klingholzstr. 7
65189 Wiesbaden

+49 (0) 611 580 66 25

Contact us

Please calculate 2 plus 6.
Copyright 2007 - 2024 InfoFabrik GmbH. All Rights Reserved.

We use cookies and other technologies on our website. While some of these are essential, others are used to improve the website and evaluate the success of our campaigns. When you use our website, data is processed to measure adverts and content. Further information can be found in our privacy policy. You have the option to adjust or revoke your settings at any time.

Datenschutzerklärung Impressum
You are using an outdated browser. The website may not be displayed correctly. Close