Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Join tables from separate ds's as if one table 1

Status
Not open for further replies.

pelajhia

Programmer
May 19, 1999
592
US
Perhaps the solution to this is obvious, because I did not find any related posts when I searched.
I am selecting data from two views in two separate db's which are set up to be virtually identical in structure, but which contain different data.
I am using CR10 and the db's are oracle.

I am pulling the data into the report and the detail I am seeing is something like this:

a.source b.source a.date b.date recordnumber=1
a.source b.source a.date b.date recordnumber=2
a.source b.source a.date b.date recordnumber=3
a.source b.source a.date b.date recordnumber=4



I would like to see something more like this, as if the data was just one table:

group a
a.source a.date recordnumber=1
a.source a.date recordnumber=2
group b
b.source b.date recordnumber=1
b.source b.date recordnumber=2

Hope this is clear enough...thanks for any ideas!
 
If you want all the records from one table followed by all the records from the second table, then you could use tableA as the datasource in your main report, and insert an unlinked subreport in the report footer that uses TableB as its datasource.

If you want to group the records in some way, then insert the groups in both the main report and the subreport, link the subreport to the main report on the group field, and then place the subreport in the group footer.

-LB
 
An alternative approach is to use a UNION query/view to combine these two result sets into one.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thank you lbass; I had gone the subreport route but was not happy with having data from one table unable to be sorted with the data from the other table.

I have created a test view using union all; that was what I needed; hope the 'dbas' let me move it into production! :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top