Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Three level report
Message
From
27/07/2013 11:54:40
 
 
To
27/07/2013 11:20:19
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01579298
Message ID:
01579300
Views:
75
>Three tables contain the following data:
>
>Table 1: One transaction per record
>Table 2: One date per record (child of transaction)
>Table 3: One atribute per record (child of date)
>
>Table 1 records may have zero, one, or many children in Table 2
>Table 2 records may have zero, one, or many children in Table 3
>
>Report should show all records from table 1, one per line
>Under each item from table 1, report should show all its children from table 2, one per line
>Under each item from table 2, report should show all its children from table 3, one per line
>
>The question: What is the easiest way to create the necesary cursor(s) to generate report
>
>TIA,
>
>Alex
select   Table1.*, ;
            Table2.*, ;
            Table3.* ;
       from Table1 ;
               left join Table2 on (Table2.FK == Table1.PK );
               left join Table3 on (Table3.FK == Table2.PK ) ;
      order by Table1.Field1, Table2.Field2, Table3.Field3 ;
      into cursor tmp
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform