Skip to main content

Can Shrink and Can Grow Features

  • 3 minutes to read

This document introduces the Can Shrink and Can Grow features of the Scheduler reporting controls representing the time cells. These features are new to version v2010 vol.1 of the Suite.

When building a report, a common task is to maximize the informational content visible, and to use the page space in the most efficient way. To help you, Scheduler Reporting has a VerticalLayout option (Fit/Tile), but this option may not be sufficient for a good result.

Currently the Scheduler Reporting has two additional options for the HorizontalWeek and TimelineCells controls, namely CanShrink and CanGrow. They enable you to modify the layout as required, to ensure the cell size fits the content. To show how these options can be used, let’s illustrate two typical scenarios.

The first scenario is a monthly report. The requirements are: each month for each resource should be printed on a separate page, while the displayed information is maximized.

To achieve this, use the HorizontalWeek control. It represents a month, so we set its height to the height of the page’s working area. The HorizontalWeek.VerticalLayoutType option should be set to ControlContentLayoutType.Fit. In this mode, all weeks are fit into the visual border of the control (as it is set in Designer). Any of the CanShrink/CanGrow options can be switched on, allowing the control to re-arrange its cells to maximize the number of appointments displayed. Note that the total height of the control remains the same. It is the same height that we set in the Designer mode.

The pictures below illustrate the report before and after the HorizontalWeek.CanShrink and HorizontalWeek.CanGrow options are switched on.

CanShrinkGrow-01

CanShrinkGrow-02

The next scenario is a task to build a timeline report. The report should display all available information, and no restrictions are posed on the page’s height. Use the TimeLineCells control. Now we set the TimelineCells.VerticalLayoutType option to ControlContentLayoutType.Tile. We set the height of the control in the Design mode. It represents the height of one resource.

CanShrinkGrow-03

If the TimelineCells.CanGrow option is switched on, the control can enlarge any resource as needed, to fit all appointments. The picture below illustrates that the height of several resources is increased so all appointments are visible. Other resources maintain the same height that has been specified in Designer.

CanShrinkGrow-04

The TimelineCells.CanShrink option specifies that cells can reduce their size if there is free space left. The cell height has an upper limit, specified in the design mode, and the cells will not be stretched beyond this border. The picture below shows that the height of cells with little or no appointments is decreased so the layout becomes more compact.

CanShrinkGrow-05

If both options (CanShrink and CanGrow) are switched on in the Tile mode, it enables you to display data optimally, in most cases. CanShrink allows the cell to shrink if there is less data than it can display with the height specified at design time, while CanGrow allows the cell to grow, in order to fit multiple appointments. See the following picture:

CanShrinkGrow-06