Conditions

<< Click to Display Table of Contents >>

Navigation:  Report Internals > Appearance > Style Designer >

Conditions

Applying of styles to the components of the report can be done:

Manually. Select the report component, select a style from the style quick menu on the Home tab, or select the desired style in the Component Style property.

Automatically by a condition. In other words, the style will be applied to the component if the condition (or conditions) is met.

 

Adding and changing the conditions for applying styles can be done in the Conditions dialog. To call this window, you need to click the Browse button in the properties panel in the style designer in the Conditions property.

 

 

As can be seen from the picture, the dialog contains one block, which shows the different types of conditions. Each type of conditions includes the following fields: name, which displays the name of the conditions, as well as the element of enabling this condition; operation type used to select an operation selected by means of which calculation of the value of the condition in the latter field specifies the values ​​for which the operation will be performed.

 

The condition Placement. This type of conditions provides the opportunity to apply a style to a component, depending on its placement. In the values field containers (bands, panel, table, page) are selected. If to select operation is equal to, then the style will be applied to the components placed on the containers, which are selected in the value field. If you select the operation not equal to, then the style will be applied to the components placed in any container other than the selected value in the field. It should also be noted that in the value field, you can choose several containers.

The condition Nested Level. C using this kind of condition the components can be styled according to the nesting level of containers on which the components are placed. In the value field you may specify the nesting level of the container (maximum 100). In this type of conditions the following operations are available:

equal to. The style will be applied when the nesting level of containers will be equal to the specified level in the field of values;

not equal to. The style will be applied to all components in containers, which the nesting levels will not be equal to the specified level in the field of values;

greater than. The style is applied to the components in containers, which nesting level is greater than the level of the specified field of values;

greater than or equal to. The style is applied to the components in containers, which the nesting level is equal to or greater than the specified level in the field of values;

less than. The style will be applied to components in containers, which nesting level is less than the specified level in the field of values;

less than or equal to. The style is applied to the components in containers, which nesting level will be equal to or less than the specified level in the value field.

 

It should be noted that this type of condition is only included if the condition of the type Placement.

 

The condition Component Type. If you want to apply style to components of a particular type, it can be done using this condition. Also, it should be noted that in the value field of this condition, you can select multiple types of components. In this condition the following operations are available: equal to, if you want the style applied to the components specified in the value field, and the operation not equal to, the choice of which style is applied to all components, except for the selected field value.

The condition Location. This type of condition provides an opportunity to apply a style to a component, depending on its location in the container. In the value field you may select the desired location of the component. The operations are available for the condition: equal to. The style is applied to all components, the location of which corresponds to the selected field values, and the operation not equal to. The style is applied to all components other than the location of which is selected in the value field. It should also be noted that in the value field you can simultaneously select multiple locations.

The condition Component Name. If you want to apply a style to a component with a certain name, it can be done using this condition. In the value field should specify the name of the component with respect to which the condition will be executed. The following operations are available when using this operation:

equal to. The style is applied to a component with a name identical to the specified one in the value field;

not equal to. The style is applied to all components, which name matches the specified field of values;

containing. The style will be applied to all components which contain the name of the specified field values in their name;

not containing. The style will be applied to all components, which in its name do not contain the name of the specified field of values;

beginning with. The style will be applied to all components for which the name starts with the name specified in the value field;

ending with. The style will be applied to all components for which the name ends with the name specified in the value field;

 

Also, it is permissible to combine different types of conditions. In this case, the style will be applied if all the conditions will work. In other words, if you are using the conditions of the type Placement and Component name, then the style will be applied only if these conditions are fulfilled, properties of the component will meet two requirements - placement and naming. In addition, you can use the multi-conditions, when two or more blocks of conditions are involved. In this case, the component will be used only in the style, if all blocks in all conditions are met.

 

 

Nesting Level

The level of nesting is the level of subordination of a component to another component, to the component of the same type. The first level of nesting is organized when the component is added to the report template, if you add a component and it will not have a subordination, it will be a component of the first level of nesting.

 

If the report has, for example, two DataBands, one of which subordinates to the second one, then the subordinated band of the second level of nesting, and the subordinating one - of the first level of nesting. If the report contains three DataBands, where the third subordinates to the second band, and the second one the first one, then they will be components of the third, second and first level of nesting. It is also worth noting that there may be several components of one nesting level, one Data Band may subordinate a few bands.

 

It should be understood that it is impossible to create a nesting level between the DataBand and the ReportTitleBand, because they belong to different types of bands. The picture below schematically shows the levels of nesting of DataBands:

 

 

 

Nesting level of the DataBands

As previously mentioned, when the component is added to the report layout, it is given the first level of nesting. Changing the level of nesting can be done using the Master Component property. For this, in the field of the property you should select the DataBand to which it will be subordinated.

 

The nesting level of the subordinated band will be the next level of the subordinating one. If you select the DataBand of the third nesting level, the band will be assigned to the fourth nesting level. Also, remember that one band may subordinate to a few bands. In this case, the subordinated bands will have the same nesting level. The picture below shows an example of report organization with the three level nesting:

 

 

 

It should be noted that creating a collection of styles, in the dialog Create Style Collection, the tenth nesting level is the maximum to be specified. It can be increased to the 100th using the Condition. The HeaderBand, FooterBand, GroupHeaderBand and GroupFooterBand relate directly to the DataBand and, therefore, their level of nesting depends on the nesting level of the DataBand to which they relate . It is important to understand that the nesting level of the DataBand and the bands related to it, does not depend on their location in the report.

 

 

The nesting level of other bands

For the ReportTitleBands and ReportSummaryBand, you can create a collection of styles of only the first and second nesting level, for these bands is impossible to create a collection of styles of the third and subsequent nesting levels. In contrast to the DataBand, the subordination is done on the location of bands on the report page.

 

For the ReportTitleBand the nesting level is determined as follows: the first (top) band is assigned to the first nesting level, and all subsequent (located below) - the second nesting level. For the ReportSummaryBand the nesting level is determined slightly different: all the bands except the last (bottom) is assigned to the second nesting level, and the last (bottom) - to the first level.

 

The picture below schematically shows the nesting levels for the ReportTitleBands and ReportSummaryBands:

 

 

 

For the PageHeaderBands and PageFooterBands, you can create a collection of styles only of the first nesting level.