Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Are multiple detail bands possible?
Message
From
22/05/2004 06:54:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
21/05/2004 17:15:07
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00906154
Message ID:
00906218
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
>I have a report that has applicant and contact information in the header and financial records in the detail band.
>
>Now contact information has been moved to a separate table to allow multiple contacts for an applicant. Can all contacts been printed and then all financial records on a single report?
>
>Can a report have more than one detail band? Or can this be done somehow in the report header or a group header?
>
>Thanks in advance for any suggestions.

Rodney,
Up to including 8 doesn't allow you to do it directly. But luckily there are few ways to do that. Report 'prints' the detail band as there are records in the current cursor/table. It simply doesn't care where the real content come from. It might be other cursors, object, array, udf etc etc.

Suppose you mimic your case with customer, orders and employee tables. You want an output like :
Customer ALFKI details (Band 1)
  Sales Representative who made sale to this customer details1 (Band 2)
  Sales Representative who made sale to this customer details2 (Band 2)
  Sales Representative who made sale to this customer details3 (Band 2)
    Order details of this customer1 (Band 3)
    Order details of this customer2 (Band 3)
    Order details of this customer3 (Band 3)
    Order details of this customer4 (Band 3)
Customer ANATR details (Band 1)
  Sales Representative who made sale to this customer details1 (Band 2)
  Sales Representative who made sale to this customer details2 (Band 2)
    Order details of this customer1 (Band 3)
    Order details of this customer2 (Band 3)
...
Then you could create a cursor that'd have as many records to print it and control what's printed using 'print when' per record. ie:
Use customer In 0 Order Tag cust_id
Use employee In 0 Order Tag emp_id
Use orders In 0 Order Tag order_id
Select 1 As BandNo, cust_id, ;
    Space(6) As emp_id, Space(6) As order_id ;
    from customer ;
    union ;
Select 2 As BandNo, cust_id, ;
    emp_id, Space(6) As order_id ;
    from orders ;
    union ;
Select 3 As BandNo, cust_id, ;
    Space(6) As emp_id, order_id ;
    from orders ;
    order By 2, 1 ;
    into Cursor crsRep ;
    nofilter
Set Relation To ;
    cust_id Into customer, ;
    emp_id Into employee, ;
    order_id Into orders
Your report might have all the info in the same detail band where Customer fields have a print when as 'BandNo=1', employee 'BandNo=2' and so on.
Alternatively with a monospaced font you might add 'subitems' as a single formatted text (from memo or udf).
Alternatively you might make it into an HTML report.
...
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform