Converting query-based components to report cube-based

In order for a query-based report component created in JReport Designer, such as table, crosstab, chart, and banded object, to be able to perform analytic reporting actions on when you work with them in Page Report Studio, JReport needs to convert the component from query-based to report cube-based.

This section describes how JReport performs the conversion work and what a report designer should pay attention to in order to increase the opportunity of success in the conversion.

When the conversion is required

The conversion is required when the Page Report Studio end user is trying to perform an analytic reporting action such as drilling through data on a table, crosstab, chart, or banded object which is created based on a query.

There is a report tab level property available in the Report Inspector of JReport Designer: Automatic Cube Initialization, which controls whether a dialog will be displayed to the user to convert the dataset to a cube when the user requests an analytic action. By default, this property is set to false which means the cube will not be automatically initialized until the user does an analysis action such as dragging a new field onto the report. After that action, the cube is initialized and normal drilling and other actions will work properly. If you expect users to use the cube actions such as drilling, you should set this to true so that the conversion will be done automatically when opening the report in Page Report Studio without the need for an explicit analysis action.

What makes the conversion successful

The success of the conversion lies in two aspects: there should be at least one report cube in the query on which the report component is created, and the fields used in the component have corresponding cube elements which have been defined in the report cube.

To ensure success of the conversion, the report designer should avoid the cases illustrated in What cannot be converted.

Tip: The report designer can create a complete and full-function report cube for the required query, in this way, all fields in the query are able to be converted since there are always corresponding cube elements found in the complete report cube. To create such a complete report cube, create a dimension and a detail information for each DBField and formula, and create a measure for each summary.

How to convert

The following lists what types of fields in the query will be converted to what types of elements in the report cube:

When Query Fields Are Used As Cube Elements
Group by field | crosstab dimension | chart X axis | chart Z axis Dimension
Crosstab aggregation Measure
Chart Y axis & summary based on fields and function Measure
Chart Y axis & a Number data type element Detail information
Others & there are corresponding detail information elements in the report cube Detail information
Others & there are not corresponding detail information elements in the report cube Dimension

What cannot be converted

The following list shows the cases in a query-based component that do not support conversion. The list supposes that all the involved query fields have their corresponding cube elements in the report cube based on the query: