A message is a carrier of information that can be sent or received between library components. It makes the communication between the library components more flexible. A library component can send out a built-in message such as Filter, Sort, Parameter, Parameters or a user defined message when a specific event occurs on it. The data component in a library component can do actions such as filter, sort, re-running using predefined parameter values or changing properties to respond a message when it receives the message. The way to send or receive a message between library components is defined in JReport Designer, then in JReport Server, when the library components are inserted into a dashboard using JDashboard, a library component will receive the message sent out by another library component or itself when a specific event occurs and do corresponding action to respond to the message.
A message consists of message ID, message name and message value set. A message ID is a natural number. JReport reserves the IDs from 1 to 1000, which are used in built-in messages, so you can only use IDs beyond 1000 to identify user defined messages. A message name is the name of a message. A message value set is a set of key-value pairs. Each key-value pair has one key and one value. A key or a value can be static or dynamic. A key is of String type, and each value has its own data type, which can be Number, Integer, String, Date, Time, Date Time, Boolean or Currency.
The following topics detail how to send or receive a message: