Creating in-memory cubes

A business view can have only one in-memory cube. When a business view contains parameters, its in-memory cube can only represent the data of one parameter scenario. However, if you want the in-memory cube to be available to Visual Analysis, the cube should contain all of the parameters in the business view.

Via JReport's scheduling mechanism, administrators are able to define when an in-memory cube for a business view will be created and when it will be updated at a specific time or periodically. In-memory cubes have no versions: once they are updated, only the latest one is kept for the business view.

If it is the first time to create in-memory cubes, the administrator needs to first configure the maximum memory allowed for all in-memory cubes.

To configure the maximum memory for in-memory cubes:

  1. On the JReport Administration page, click Cube on the system toolbar.
  2. In the Cube panel, click Configuration on the task bar.
  3. In the Cube Configuration dialog, specify a value no larger than 80% of your Java Heap size for the Maximum Cube Memory Allowed option.
  4. Click OK.

It can also be specified by the property server.cube.maxmemory in the server.properties file in the <install_root>\bin directory.

To create an in-memory cube:

  1. On the JReport Administration page, click Cube on the system toolbar.
  2. In the Cube panel, click New Cube on the task bar.
  3. In the New Cube dialog for selecting business view, click next to the Select a Folder text field.
  4. In the Select Folder dialog, browse to the folder containing the required catalog and click OK.
  5. From the Select a Catalog drop-down list, select the required catalog in the specified folder.
  6. In the Select Business View box, select the business view on which to create the in-memory cube.
  7. Click OK and you are then directed to the New Cube dialog for scheduling.
  8. In the General tab, you can specify values to the parameters of the business view if there are any. If no values are provided, the default values will be applied. The business view name will be used as the new in-memory cube name. Specify the other settings in the tab if needed.
  9. In the Schedule tab, specify the time for when the task is to be performed in the Time sub tab, and select or create a trigger to bind with the task in the Trigger sub tab. The setting in the Schedule tab decides when the in-memory cube will be created and when it will be updated.
  10. In the Settings tab,
    1. In the Maximum Memory Allowed text box, provide a value for the cube. The value must be specified, otherwise you are not allowed to continue with other tabs or to finish the dialog.
    2. If you would like to cache the cube on disk once the available memory is exhausted, select Move the cube to disk if insufficient memory was allocated. If this option is not selected and the memory is not enough for the cube, the cube status will be disabled and an error will be shown in the log tab.
    3. If you would like the detail data in the business view to be cached onto disk, select Cache Detail on Disk. Otherwise if you need only the aggregation data to be cached, unselect the option.
  11. In the Notification tab, specify to notify someone via e-mail when the task is finished and whether it is successful or unsuccessful.
  12. Click Finish, and JReport Server will then perform the task at the requested times.

See also New Cube dialog for additional information about options in the dialog.

After an in-memory cube is created and ready for use, all web reports, library components and visual analyses based on the same business view as the cube will automatically use the cube for retrieving data.

Since an in-memory cube freezes parameters in its related business view, if a report uses an in-memory cube and its business view contains parameters, when running the report, only parameters used in the report are available for specifying values and the business view parameters will be disabled for editing. In JReport, a parameter may depend on another parameter; if the latter is frozen, the former will be frozen as well.