## Inheriting the style from a data container

The four types of data containers - table, crosstab, chart, and banded object - can remember the style applied to them and therefore their style can be inherited by another component or a new segment inserted into them.

When inserting a component or a new segment into a table, crosstab, chart, or banded object, by default the former will inherit the style from the latter. However, when inserting a table, crosstab, chart, or banded object via the component creation dialog into a table or banded object, JReport provides you with the opportunity to cancel the way of inheriting style and instead specify a new style to the component. In this case, the inserted component reserves its own style independent from the style of the parent data container.

An option Inherit Style is provided for enabling a table, crosstab, chart, or banded object to inherit the style from a parent table or banded object. It is available:

- In the component creation dialog when inserting a table, crosstab, chart, or banded object into a table or banded object via the Insert menu.
- In the Style screen of the report wizard of a table, crosstab, chart, or banded object which is in a table or banded object.
- In the style list on the toolbar. The Inherit Style here only works on the objects which are in a table, crosstab, chart, or banded object.

When modifying the style of one of the four types of data containers, if the child component's style type is Inherit Style, it will change to apply the new style accordingly. However if the child component has a style, it will reserve its own style.