Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Headers and details
Message
From
29/05/2006 08:03:04
 
 
To
29/05/2006 07:03:32
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01125622
Message ID:
01125642
Views:
21
>>Hi all
>>
>>Probably it's very simple and common question, thank's for help:
>>
>>I have a two cursors, one is customer information (name,family, ssn etc) and one is customer details (shipdate, product, price etc).
>>
>>I want a separate report page for each customer, the customer information will apear in the report header and the details will apear as list.
>>
>>Where and how do I have to place the information in the report?
>>
>>Thank's
>
>Chaim,
>There are more than one approaches. I prefer SQL based one.
>
>1)
>
>use details order tag customerID in 0
>use customer order tag customerID in 0
>select details && yes, relation is from child to parent - or you could use set skip to
>set relation to customerID into customer
>report form myReport preview
>
>2)
>
>select cs.*, dt.shipdate,dt.product,dt.price ;
> from customer cs ;
> left join details dt on cs.customerId == dt.customerID ;
> order by cs.Name,dt.ShipDate desc ;
> into cursor crsReport
>report form myReport preview
>
>
>First you sould notice that SQL version is much more flexible collecting all the fields needed for report into a single cursor with added ability to order by anyway you wish (for sample it orders by customer name and then from customer's last shipped order to first shipped).
>
>In report itself you create a grouping on customerID (whatever the order is this would change per customer). Place customer 'header' fields in group band and 'details' in detail band. While creating the group from menu report\data grouping mark all 3 options (or 1st and 3rd) under "Group properties".
>PS: In report make sure you don't use any alias for fields and data environment is empty.
>Cetin
Very good
Thank you
Thank you
Chaim
Previous
Reply
Map
View

Click here to load this message in the networking platform