Support

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
info@yourdomain.com

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 A. Expression Language

A. Expression Language

In many cases ReportServer allows to insert formulas which are interpreted at runtime instead of static values. Such expressions are always initiated by a dollar sign and an opening curly bracket and closed with a closing curly bracket. The actual expression is given within the curly brackets: ${formula/expression}. ReportServer uses the unified expression language (UE) standardized in JSR-245 (https://www.jcp.org/en/jsr/detail?id=245 and http://www.oracle.com/technetwork/java/unifiedel-139263.html).

An expression can be a simple calculation or string function such as ${3 + 5} which would compute the number 8. Depending on the context different objects/replacements (such as the today object in filters, see the User Guide for further information) are available.

Besides the basic arithmetic operators you can use the mathematical functions defined in Table .

List of mathematical functions

math:random() Returns a random number between 0 and 1
math:sin(Double) Computes the sine function.
math:cos(Double) Computes the cosine function.
math:tan(Double) Computes the tangent function.
math:abs(Double) Returns the absolute value.
math:ceil(Double) Returns the smallest double value that is greater or equal to the argument and which is equal to a mathematical integer.
math:floor(Double) Returns the largest double value that is less or equal to the argument and which is equal to a mathematical integer.
math:round(Double) Returns the rounded number (as an integer).
math:max(Double, Double) Returns the greater of the two arguments.
math:min(Double, Double) Returns the smaller of the two arguments.
math:pow(Double, Double) Returns the first value raised to the power of the second.
math:log(Double) Computes the natural logarithm.
math:exp(Double) Computes the value e raised to the power of the argument.
math:sqrt(Double) Computes the square root of the argument.
math:signum(Double) Computes the signum function.

To work with strings the following functions can be used in addition to the methods provided by the java string object:

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

The ternary operator can be used to define conditional expressions:

Condition ? Expression if condition evaluates to true : Expression 
		if condition evaluates to false.

Thus the expression ${math:random() < 0.5 ? true : false} returns boolean value which is TRUE if the random number is less than and FALSE otherwise. Thus this expression returns TRUE with probability 50%. Depending on the context various objects can be accessed and methods can be called on these objects. In filters, for example, the object "today" can be used to specify dates. To call a method on an object write ${object.methodname()}. The today object returns the current date. To return the first of the current month you can use the method firstDay and write: ${today.firstDay()}.

InfoFabrik GmbH

Wir wollen, dass alle Unternehmen, Institutionen und Organisationen, die Daten auswerten, selbständig und zeitnah genau die Informationen erhalten, die sie für ein erfolgreiches Arbeiten benötigen.

InfoFabrik GmbH
Klingholzstr. 7
65189 Wiesbaden
Germany

+49 (0) 611 580 66 25

Kontaktieren Sie uns

Was ist die Summe aus 6 und 5?
Copyright 2007 - 2024 InfoFabrik GmbH. All Rights Reserved.

Auf unserer Website setzen wir Cookies und andere Technologien ein. Während einige davon essenziell sind, dienen andere dazu, die Website zu verbessern und den Erfolg unserer Kampagnen zu bewerten. Bei der Nutzung unserer Website werden Daten verarbeitet, um Anzeigen und Inhalte zu messen. Weitere Informationen dazu finden Sie in unserer Datenschutzerklärung. Sie haben jederzeit die Möglichkeit, Ihre Einstellungen anzupassen oder zu widerrufen.

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