views:

383

answers:

0

i need to create a QuickReport in Delphi 5 that is laid out as:

+================
| 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)
+=============================

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?

Don't confuse my use of the terms

  • header band
  • detail band
  • child band
  • footer band

to imply that any of the bands have to be of those actual types. i use those terms in the conceptual sense:

  • a single band at the start of the entire report (report header)
  • a repeating group of four bands
  • three bands that appear after all the detail, the first two being auto-stretchy

Same question, only longer

+===========================================
| 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
+===========================================

i can make up some tables that mimic the example i made up:

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 )

My failed experiment

i've tried to create a QuackReport with the following band layout:

+=====================================================+
| 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)           |
+=====================================================+

Note: The indenting is used to help identify parent-child relationships (i.e. the band isn't actually indended 50 pixels)

The problem with this design is that, at design time at leat, the Summary band appear before the two stranded child bands:

+=====================================================+
| 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)                              !
    +=================================================+

And when the report is run (at runtime), the two stranded child bands don't even print:

+=====================================================+
| PageHeader (TQRBand, BandType=rbPageHeader)         |
+=====================================================+

+=====================================================+
| DetailBand (TQRBand, BandType=rbDetail)             |
+===+=================================================+
    | ChildBand1 (TQRChildBnad, Parent=DetailBand)    |
    !      (autostretch)                              !
    +===+=============================================+
        | ChildBand2 (TQRChildBand, Parent=ChildBand1 |
        +=============================================+

+=====================================================+
| SummaryBand (TQRBand, BandType=rbSummary)           |
+=====================================================+

Captcha: quackreports