How Report Items are Layout in a Section
All report items grow from top to bottom and some (SubReport) can grow from left to right as well. When they grow, the items
below/on the right are pushed down/right. Changing visibility of items at runtime would trigger the same effect i.e. items below or
on the right side of the hidden item would move up or to the left to occupy the space of the hidden item.
If you have two report items positioned vertically with 1in space between them, hiding the first report item
would result in the second item occupying the first item's height only. The 1in space between the report items is preserved at all times.
Section/Panel item can grow to accommodate their children but cannot shrink/take space that is no longer occupied. To remove such space
in a container (report section or panel item), set its height to a very small value (e.g. 1mm). If you want a section/panel to
shrink only at runtime you can set its Height property in the report constructor.
Place the Height property assignment code just after the IntializeComponent() method call.
Report items can be hidden or displayed by default, or hidden or displayed conditionally using Conditional Formatting or Bindings.
Optionally, the visibility can be switched by clicking another report item (Drilldown Report Action).
In report with complex layout, changing the visibility of an item does not guarantee that the space it occupies would be filled in by the items below or to the right of it.
The following visibility rules apply when rendering report items (red lines define layout dependency):
- If Item1 is hidden, all items below Item2 would remain in place.
- If Item1 is hidden, all items right to Item3 would remain in place.
- If Item1 and Item3 are hidden, Item2 will move to the left to fill in the space. Renderers maintain the
space between report items that you define in the report layout.
- If the visibility of a report item and its contents can be switched by clicking another report item, then
pagination changes to accommodate the report item and its contents only when it is initially displayed.
- If a report item is placed in a Panel, its visibility does not affect the original layout of items outside the Panel.
Keeping Report Items Together
Report items in a report can be kept together on a single page by setting
the KeepTogether property. For keeping items in a report group or table group together, set GroupKeepTogether property.
Report items are always rendered on the same page if the report
item is smaller in size than the usable page area. If a report item does
not completely fit on the page on which it starts, a page break is inserted before the report item,
forcing it to the next page. For logical page renderers, the page grows to accommodate the report item.
When a report item is always hidden, the rules for keeping items together are ignored.
The following items are always kept together: