Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report from 2 tables
Message
From
06/10/1999 22:09:47
 
 
To
06/10/1999 21:17:11
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00272542
Message ID:
00273489
Views:
22
>>>Hello all,
>>>I want to make a report from 2 tables which do not relate. This means my report has 2 detail banks (or like this). For example :
>>>
>>> - list of records from tableA
>>> .......
>>> - list of records from tableB
>>> ....
>>>
>>>TableA do not relate to tableB.
>>>
>>>How can I make the report ?
>>>Thanks for any help.
>>
>>You should concatenate records from both tables using UNION clause of SELECT_SQL, e.g.
>>Select 1 as listorder, field1,field2,space(10) as field3, ;
>>space(20) as field4 from table1 ;
>>into cursor tmp1 ;
>>Union All Select 2 as listorder, space(15) as field1, ;
>>space(90) as field2, field1 as field3, field2 as field4
>>
>>Now you may use common detail band with overlapping fields, and 'Print When' some fields for listorder=1 and others for listorder=2.
>
>
>Thanks for your help. But 2 tables are different fields, datatype and even i want to represent in report with different layout for them. Can you help me ?
>
>TIA

Look at the code again. You add dummy fields to concatenate both tables, i.e. in resultset field1,field2 represent table1 and field3,field4 represent table2. Diiferent layout will actually mean that you would have overlapping field1,field2 and field3,field4 in detail band.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform