Property references for Java™ developers

A report can use a property reference to access a property broker property's value. A property reference uses the syntax ${scope:name} to refer to the property broker property with that scope and name.

If the property reference refers to a property that does not exist, the property reference will display a value of null.

You can also define a type and default value for the property reference using the syntax ${scope:name = (type) defaultValue}. To define a default value that is an array, use the syntax ${scope:name: (type) [element1, element2, element3]}. The type and default value are applied only if the property did not exist before the reference.

The following characters are reserved.
Reserved characters
$ [
: ]
= .
( ,
) '
{ "
} \

If you want to use a reserved character in a property reference as part of the property scope, property name, default value, or expression argument, you must escape the character. You also must escape the character if you want to use it as part of the text that appears before or after a property reference.

For example, the report has the report properties myInteger with a value of 13 and myString with a value of "ABC". The report does not initially define the report property myDouble. You want to print out the following text:

The value of myInteger is ${myInteger}.
The value of myDouble is ${myDouble = (Double)3.14159}.
The value of myString is \"${myString = (String)XYZ}\".
The output shows:
The value of myInteger is 13.
The value of myDouble is 3.14159.
The value of myString is "ABC".
A property reference creates a property listener that attaches to the property. When the property's value changes, the property broker notifies the property reference, which is updated.