The Vertical Elasticity property specifies how the vertical size of the object may change at runtime to accommodate the objects or data within it:
For frames and repeating frames, elasticity defines whether the size of the frame or repeating frame should vary with the objects inside of it.
For objects containing text, elasticity defines whether the field or boilerplate should vary with the size of the text. Fixed size text will wrap within the defined size of the object and may be truncated if there is not enough room. Number or date data will appear as asterisks if the data cannot fit within the defined size.
For images, drawings, and graph objects, Reports Builder uses proportional scaling. The elasticity options for images, drawings, and graph objects determine the scaling factor.
The following figure illustrates how the Vertical Elasticity property is depicted in the Paper Layout view.
Applies to |
Layout objects | ||||||||
Values |
| ||||||||
Default |
Varies according to the object | ||||||||
Required/Optional |
Required |
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 on the page height) |
no overflow |
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 |
When formatting an object, if Vertical Elasticity is Fixed, Reports Builder will only format it on a logical page if the page has enough space to contain the entire object.
If Vertical Elasticity is Expand, Reports Builder will only format the object on a logical page if the page has enough space to contain the defined height of the object (that is, its minimum size). If formatting is not complete, the object overflows to the next page.
If Vertical Elasticity is Variable or Contract, Reports Builder will format as much of the object as possible on the first logical page and, if necessary, complete the object on the following logical page(s).
If a number cannot fit in its field, then asterisks will appear in the field instead of the value. To get the value to appear, you either need to resize the object or change its elasticity to Expand or Variable.
If the elasticity of the layout object is variable (that is, both Vertical and Horizontal Elasticity are Variable), then the contents will appear the same size as they do in their source (for example, the source file).
If the elasticity of the layout object is fixed (that is, both Vertical and Horizontal Elasticity are Fixed), then proportional scaling is performed on the contents. In some cases, this may lead to empty space or "gaps" between the contents and the border of the object. For example, if an object is fixed both horizontally and vertically and the image is too large for the object, then the image will only fill the object in one direction. In the other direction, the image will be shorter than the object. To avoid these gaps, you can either change the elasticity (for example, make it variable horizontally, vertically, or both) or you can manually resize the object.
If an object containing an image, drawing, or graph is Fixed in only one direction, Reports Builder will always attempt to have the contents fill up the Fixed dimension.
If the elasticity of the object is Contract in one direction and Fixed in the other, the contents may be clipped. To avoid clipping of the contents, you can either change the elasticity (for example, make it Variable both horizontally and vertically) or you can manually resize the object.
If the elasticity of the object is variable (that is, Vertical or Horizontal Elasticity is Variable) and the object cannot fit in its enclosing object (for example, a frame or the logical page), the report will infinitely loop (because the object can never format).
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:
If a summary column has a Reset At or Compute At of Page, then the field or boilerplate object that displays its value must have fixed elasticity.
If a formula or summary column relies on a summary column that has a Reset At or Compute At of Page, then the field or boilerplate object that displays its value must have fixed elasticity.
If the Source of a field is &Logical Page Number, &Panel Number, &Physical Page Number, &Total Logical Pages, &Total Panels, or &Total Physical Pages, then any object that displays the field (either the field itself or a boilerplate object) must have fixed elasticity.
If a field has a page number as its Source and, in the Page Numbering dialog box, Reset At is a repeating frame, then any layout object that displays its value must have fixed elasticity.
If a field containing a page-dependent reference has Visible set to No, then the field may have Horizontal Elasticity of Variable, Expand, or Contract. Any boilerplate object that references the field, though, must be fixed in elasticity.
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.
Suppose that you have a field with the following characteristics:
Characteristic |
Value |
width in Report Editor | 1 inch |
Horizontal Elasticity property | Fixed |
height in Report Editor | 2 inches |
Vertical Elasticity property | Expand |
The figure below shows what the field might look like when formatted. Note that the field always takes up at least two inches vertically and is always one inch wide. If the data takes more than one inch horizontally and two inches vertically, the field grows vertically to accommodate the data.
Suppose that you have a frame named M_2 with the following characteristics:
Characteristic |
Value |
width in Report Editor | 5 inches |
Horizontal Elasticity property | Fixed |
height in Report Editor | 3 inches |
Vertical Elasticity property | Variable |
Assume further that the Page Height for the report is thirteen inches. Because of the size of the objects within it, M_2 requires eight inches vertically to format. Another frame, called M_1, precedes M_2 on the logical page and takes up six inches.
The following figure shows how the frame might be formatted.
Note that all of M_2 cannot fit on the first logical page. Because the Vertical Elasticity is Variable, the first six inches of M_2 are printed on the first logical page and the last two inches are printed on the second logical page. Had the Vertical Elasticity been Fixed, it would print 3 inches of M_2 on the first page, then 3 inches on the 2nd page in the same spot and so on as it was implicitly anchored to the top left corner of the body. However if Page Protect was also set to Yes, all of M_2 would have printed on the second logical page.
Copyright © 1984, 2005, Oracle. All rights reserved.