title: Delphi QuickReports: Band order to achieve detail-child-child-child banding?
body: <p>i need to create a QuickReport in Delphi 5 that is laid out as:</p>
  
  <pre><code>+================
  | Report Header
  +================
  
  +=========================================
  | Detail Band (auto-stretching, repeats)
  .
  +=========================================
     |    Child band (fixed-size)
     +======================================
     |    Child band (Auto-stretching)
     .    
     +======================================
     |    Child band (fixed-size)
     +======================================
  
  +=================================
  | Report Footer (auto-stretching)
  . 
  +=================================
  
  +==================================
  | Report Footer (auto-stretching)
  . 
  +==================================
  
  +=============================
  | Report Footer (fixed size)
  +=============================
  </code></pre>
  
  <p>Can anyone come up with with a combination of header, detail, child, footer, sub-detail, group header, group footer bands - and the associated Parent, Master, Report, Query links between them, so that i can make a report like i need it to look?</p>
  
  <p>Don't confuse my use of the terms</p>
  
  <ul>
  <li>header band</li>
  <li>detail band</li>
  <li>child band</li>
  <li>footer band</li>
  </ul>
  
  <p>to imply that any of the bands have to be of those actual types. i use those terms in the conceptual sense:</p>
  
  <ul>
  <li>a single band at the start of the entire report (report header)</li>
  <li>a repeating group of four bands</li>
  <li>three bands that appear after all the detail, the first two being auto-stretchy</li>
  </ul>
  
  <h2>Same question, only longer</h2>
  
  <pre><code>+===========================================
  | Suspicious Transaction Report
  |   STR No.: 12345
  |      Date: 11/28/1973
  |
  |   Comments: as per NSL 1/13/2010
  +===========================================
  
  +===========================================
  | Transaction 1 of 7
  |      Buy                  Sell
  |     $100.00            $16,000.00
  |                        $27,000.00
  |                        $12,000.00
  .                            ...
  +===========================================
  |  Customer Information
  |           Name: Shelby Lake
  |        Address: 11111 S NC-HWY 111
  |            DOB: 6/19/1981
  |         ID No.: G123-456-789
  |     Occupation: waitress
  +===========================================
  |  Original Transaction
  |       Buy                 Sell
  |      $100.00           $16,000.00
  |    $3,000.00           $27,000.39
  |   $64,132.69           $12,000.13
  .       ...                  ...
  +===========================================
  |  Third Party Information
  |           Name: Yugo Chavez
  |        Address: 11111 S AB
  |            DOB: 9/15/1934
  |         ID No.: 995-1935
  |     Occupation: dictator
  +===========================================
  
  ...
  
  +===========================================
  | Transaction 7 of 7
  .
  .
  +===========================================
  
  +===========================================
  | Description of Suspicious Activity
  |   Customer had beedy eyes, that moved
  |   rapidly from left to right. He...
  .   ...
  +===========================================
  
  +===========================================
  | Action Taken
  |   We killed him, went through his
  |   pickets, then started digging the...
  . 
  +===========================================
  
  
  
  
  
  +===========================================
  | 
  |    Signature: _______________________
  |                    Bruce Wayne
  |        Title: The Batman
  |  Employee ID: 1337-6669
  +===========================================
  </code></pre>
  
  <p>i can make up some tables that mimic the example i made up:</p>
  
  <pre><code>CREATE TABLE STRs (
     StrID int,
     Number text,
     Date datetime,
     Comments text,
     DescriptionOfSuspiciousActivity text,
     ActionTaken text,
     EmployeeName text,
     EmployeeTitle text,
     EmployeeNumber text )     
  
  CREATE TABLE STRTransactions (
     STRTranasctionID int,
     STRID int,
     BuyAmount money)
  
  CREATE TABLE STRTransactionSells (
     STRTransactionID int,
     SellAmount money)
  
  CREATE TABLE STRTransactionPatronInfo (
     STRTransactionID int,
     Name text,
     Address text,
     DOB text,
     IDNumber text,
     Occupation text )
  
  CREATE TABLE STRTransactionThirdPartyInfo (
     STRTransactionID int,
     Name text,
     Address text,
     DOB text,
     IDNumber text,
     Occupation text )
  
  CREATE TABLE OriginalTransactions (
     STRTransactionID int,
     BuyAmount money,
     SellAmount money )
  </code></pre>
  
  <hr>
  
  <h2>My failed experiment</h2>
  
  <p>i've tried to create a QuackReport with the following band layout:</p>
  
  <pre><code>+=====================================================+
  | PageHeader (TQRBand, BandType=rbPageHeader)         |
  +=====================================================+
  
  +=====================================================+
  | DetailBand (TQRBand, BandType=rbDetail)             |
  +===+=================================================+
      | ChildBand1 (TQRChildBnad, Parent=DetailBand)    |
      !      (autostretch)                              !
      +===+=============================================+
          | ChildBand2 (TQRChildBand, Parent=ChildBand1 |
          +=============================================+
  
  +=====================================================+
  | ChildBand3 (TQRChildBand, Parent=(none)             |
  !      (autostretch)                                  !
  +=====================================================+
      | ChildBand4 (TQRChildBand, Parent=ChildBand3     |
      !      (autostretch)                              !
      +=================================================+
  
  +=====================================================+
  | SummaryBand (TQRBand, BandType=rbSummary)           |
  +=====================================================+
  </code></pre>
  
  <p><strong>Note:</strong> The indenting is used to help identify parent-child relationships (i.e. the band isn't actually indended 50 pixels)</p>
  
  <p>The problem with this design is that, at design time at leat, the <strong>Summary</strong> band appear before the two stranded child bands:</p>
  
  <pre><code>+=====================================================+
  | PageHeader (TQRBand, BandType=rbPageHeader)         |
  +=====================================================+
  
  +=====================================================+
  | DetailBand (TQRBand, BandType=rbDetail)             |
  +===+=================================================+
      | ChildBand1 (TQRChildBnad, Parent=DetailBand)    |
      !      (autostretch)                              !
      +===+=============================================+
          | ChildBand2 (TQRChildBand, Parent=ChildBand1 |
          +=============================================+
  
  +=====================================================+
  | SummaryBand (TQRBand, BandType=rbSummary)           |
  +=====================================================+
  
  +=====================================================+
  | ChildBand3 (TQRChildBand, Parent=(none)             |
  !      (autostretch)                                  !
  +=====================================================+
      | ChildBand4 (TQRChildBand, Parent=ChildBand3     |
      !      (autostretch)                              !
      +=================================================+
  </code></pre>
  
  <p>And when the report is run (at runtime), the two stranded child bands don't even print:</p>
  
  <pre><code>+=====================================================+
  | PageHeader (TQRBand, BandType=rbPageHeader)         |
  +=====================================================+
  
  +=====================================================+
  | DetailBand (TQRBand, BandType=rbDetail)             |
  +===+=================================================+
      | ChildBand1 (TQRChildBnad, Parent=DetailBand)    |
      !      (autostretch)                              !
      +===+=============================================+
          | ChildBand2 (TQRChildBand, Parent=ChildBand1 |
          +=============================================+
  
  +=====================================================+
  | SummaryBand (TQRBand, BandType=rbSummary)           |
  +=====================================================+
  </code></pre>
  
  <p>Captcha: quackreports</p>