I'm using Crystal Reports ver. 8.0.1 on Oracle version 9, I need to create a report wheer a couple of colums have to come out of one of two tables, if the element on table A exists on table B, then I have to report from that table, but if it does not exist I have to report from table A, for this, the best way to do it is to use an SQL command called UNION where I can produce ouput from two separate queries, where do I insert this query ?
If I try to design a two source report inside the link window, it only considers one of the selects, and if I go to the Database / Show SQL Query window it discards any change I make, and it also sends me an error message if I try to use the UNION comand.
Create left outer join on table A with table B
(join Type inwhich join with unique key)
i.e all records from table A and get info of table B related to it.
create a formula in crystal report
check place on column of table B
Which you want to show on matching
check can be apply by isnull function
if is null true then show column of table a
else show table b