PANTHEON™ manual

 Categories
 PANTHEON Help - Welcome
[Collapse]PANTHEON
 [Collapse]Guides for PANTHEON
  [Collapse]Guide for PANTHEON
   [Collapse]Settings
    [Expand]Subjects
    [Expand]Items
    [Expand]POS
    [Expand]Manufacturing
    [Expand]Personnel
     Calendar
    [Expand]Financials
    [Expand]Customs
    [Collapse]Program
     [Expand]Document Types
     [Collapse]Reports in PANTHEON
       Settings in Administration Panel
      [Expand]Reports Register
       Print Preview
      [Expand]Report Designer
      [Collapse]Creating Reports
        Report Objects
        "Hello, World!" Report Example
        Basic Work with Objects
        The "Text" Object
        Displaying Expressions with the Help of the "Text" Object
        Bands
        "Subject List" Report: Aliases and Variables
        "Picture" Object
        Stretching Objects, Page Breaks and Shifting Objects
        Displaying Data in the Form of a Table
        Printing Labels
        Child Bands
        Report with Two Data Levels (Master-Detail)
        Headers and Footers of a Data Band
        Multi-Page Report
      [Expand]Groups and Aggregates
      [Expand]Formatting and Highlighting
       Nested Reports (Subreports)
      [Expand]Specifics of Printouts in PANTHEON
      [Expand]Script
       Report Design Considerations
      Document Texts
      Delivery Methods
     [Expand]Loyalty Cards
     [Expand]Administration Panel
     [Expand]Dashboard Components
      Dashboard Reports
      Ad-hoc analysis
     [Expand]ARES
      SQL urejevalnik
    [Expand]Documentation
    [Expand]Change User
   [Expand]Orders
   [Expand]Goods
   [Expand]Manufacturing
   [Expand]POS
   [Expand]Service
   [Expand]Financials
   [Expand]Personnel
   [Expand]Analytics
   [Expand]Desktop
   [Expand]Help
   [Expand]Messages and Warnings
   [Expand]Additional programs
   [Expand]Old products
  [Expand]Guide for PANTHEON Retail
  [Expand]Guide for PANTHEON Vet
  [Expand]Guide for PANTHEON Farming
 [Expand]User Manuals for PANTHEON
[Expand]PANTHEON Web
[Expand]PANTHEON Granules
[Expand]User Site

Load Time: 687.49 ms
print   |
Label

Child bands

Child Bands

When we need that parts of the band have different properties, we divide it into several bands. The first one remains the same, and the rest are subordinate to it (Child band). Many such bands are on the report '241 - Invoice' that can be find in menu 'Goods | Issue'. On this report we can find many bands which have different conditions for visibility. Conditions are in this case defined in the script. Child bands are also used in the case when on the band is an object whose height changes, and the distance to the lower objects must remain the same. Each child band, except the last one must have assigned the "Child" property, its value is the name of the next child band in the group. Also parent band of the first child band in the group must have assigned the "Child" property. If we want that next child bands in group can be visible (if it suits condition for visibility) you must enabled the "PrintChildIfInvisible" property of child and on the parent band.

Let's look an example!

There can be a problem when one field in a report has content of variable length. To simulate this in our example, let's reduce the width of the Bio.“Common Name” object to 2.5 cm and enable the “Stretch” property for this object and also for the “First level data” band. Enable all the frame lines for all the objects so that the effects of the stretching function are clear to see. The design now outputs a report like this:

_img112

Here the first Bio.“Common Name” field object contains a lot of text and is stretched into two lines. This causes the Bio.“Length (cm)” field object, located beneath it, to be shifted downwards. This happens because all the objects have their "ShiftMode" property set to "smAlways" by default, meaning they shift downwards if there is a stretchable object (a “Text” object with the “Stretch” property enabled) above them. The distance shifted depends on how much the object above is stretched.

But this is not want we want to happen on our label - we want the “Length, cm.” object also to be shifted by the same amount. This can be achieved by using a special FastReport band type called the “Child” band. A “Child” band is linked to (and displayed after) its parent band. Add a “Child” band to the design and drag the two “Text” objects into it, as shown here:

clip0167

Link the MasterData band to the Child band, by setting its “Child” property to “Child1” in the Object inspector. Now, each time the MasterData band prints, the Child band is printed immediately after it:

_img114

The “Length, cm:” title now lines up exactly with its value field “50”. To prevent a child band from being moved to the next page if there is insufficient white space on the page (and becoming so-called 'orphaned' from its parent band), enable the “KeepChild” property of the parent band in the Object inspector.



Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!