A script-enabled browser is required for this page to function properly.

Horizontal Elasticity property

The Horizontal Elasticity property specifies how the horizontal size of the object will change at runtime to accommodate the objects or data within it:

The following figure illustrates how the Horizontal Elasticity property is depicted in the Paper Layout view.

Horizontal Elasticity property in the Paper Layout view

 

Applies to

Layout objects

Values

 

Contract

Means the horizontal size of the object decreases, if the formatted objects or data within it are wide enough, but it cannot increase to a width greater than that shown in the Report Editor. Truncation of data may occur; look at the examples. (You can think of this option as meaning "only contract, do not expand.")

Expand

Means the horizontal size of the object increases, if the formatted objects or data within it are wide enough, but it cannot decrease to a width less than that shown in the Report Editor. (You can think of this option as meaning "only expand, do not contract.")

Fixed

Means the width of the object is the same on each logical page, regardless of the size of the objects or data within it. Truncation of data may occur; look at the examples. The width of the object is defined to be its width in the Report Editor.

Variable

Means the object may expand or contract horizontally to accommodate the objects or data within it (with no extra space), which means the width shown in the Report Editor has no effect on the object's width at runtime.

Default

Varies according to the object

Required/Optional

Required

Restrictions

Caution: If the contents of an object exceed its defined height, its Vertical and Horizontal Elasticity determine whether the contents overflow onto the next page or are truncated. Images, drawings, and chart objects cannot overflow. See the rules below for details about images, drawings, and graphs.

The table below shows the combinations of objects and elasticity choices that cause overflow and truncation.   (Expand and Variable in the table apply if either the Vertical or Horizontal Elasticity is Expand or Variable.)

        

Object

Fixed/ Contract

Expand

Variable

repeating frame instances and frames (contents <= defined height)

no overflow

no overflow

no overflow

repeating frame instances and frames (contents > defined height or width)

If both Horizontal and Vertical Elasticity of frame is Fixed or Contract but the field is variable or expandable, then overflow to the next page if frame and field are smaller than the data returned.

If Horizontal and Vertical Elasticity of the field is Fixed or Contract then data is truncated.  

 If the field is Contract or Fixed, then the data is truncated regardless of the frame.  

overflow, if unable to fit on the page

overflow, if unable to fit on the page

fields and boilerplate (contents <= defined height)

no overflow

no overflow

no overflow

fields and boilerplate (contents > defined height)

truncate

Note: To avoid truncation, set the field or boilerplate's Vertical Elasticity to Variable and surround it with a frame that has Fixed Vertical Elasticity. Note also, that when truncation of text occurs, it occurs after the field or boilerplate text has been wrapped.

overflow, if unable to fit on the page

overflow, if unable to fit on the page

Images, Drawings, and Graphs

Page-Dependent Referencing

If a value to be displayed in the report output relies on the formatting of the report, then the field or boilerplate object that displays the value must have a Vertical and Horizontal Elasticity of Fixed. (This is sometimes referred to as page-dependent referencing.) If the elasticity is not fixed, Reports Builder will change it to be fixed at runtime.

A typical case of page-dependent referencing is a field that has a Source of &Total Logical Pages. The total number of logical pages cannot be determined until the entire report has been formatted. But Reports Builder must format the field before the end of the report and cannot wait until the report is completely formatted to determine how big to make the field. Consequently, the field's elasticity must be fixed, so that Reports Builder knows how much space to reserve for it before its source value is determined.

In page-dependent referencing, a field or boilerplate object's elasticity must be fixed because its source value depends on the formatting of the report:

Truncating data

If you want your data truncated, you should use the SQL SUBSTR function in your query. For example, if you want only the first four characters of a column, then use SUBSTR in your SELECT statement to retrieve only those characters from the database.

Examples

Example 1:  Horizontal Elasticity for a field

Suppose that you have a field with the following characteristics:

Characteristic

Value

width

1 inch

Horizontal Elasticity

Contract

height

1 inch

Vertical Elasticity

Fixed

graphic depicting horizontal elasticity for a field

Note that when the data is less than one inch wide the size of the field decreases to the minimum size necessary to hold the data. It is also important to note here that if the data was more than one inch long, it would be truncated because the field cannot expand vertically or horizontally.

Example 2:  Horizontal Elasticity for a frame

Suppose that you have a frame named M_1 with the following characteristics:

Characteristic

Value

Horizontal Elasticity

Variable

height

7 inches

Vertical Elasticity

Fixed

Assume further that the Page Width you defined in the report property sheet is eight inches. M_1 contains a repeating frame with one field, F_Ename. The first value of F_Ename is four inches wide, the next value is 3 inches, the next is four inches, and the last is four inches. The following diagram shows how the frame might be formatted:

graphic depicting horizontal elasticity for a frame

Note that the first two instances of field F_Ename print on the first logical page, but, the second two instances, because there is not enough room on the first logical page, print on the second logical page. It is also important to note that if the Horizontal Elasticity was Contract or Fixed, instead of Variable, the frame would not print unless it could fit entirely on one logical page.

See also

About layout defaulting