Crystal Help - Union in Crystal

Hello,
I have to design a report such that-
I have 2 tables RXS and HRXS, they are joined on rx#,patient# and facility#.
When displaying I have to display data from both rxs and hrxs table like a union all.
Is it possible in crystal?
Please advice.
Star79Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
Joining indicates these is a relationship you wish to use between the tables like an SalesOrder and SalesOrderDetails

SalesOrder has the SalesOrder # and information on the customer while the details has the details of the order.  

Generally linking like this is between tables that have different data

A desire for a union would indicate the tables have the same data columns for instance one being Open Orders and the other being Fulfilled or Closed Orders

You can do a union in Crystal in 3 basic ways
1.  Create a view/stored procedure in the database that unions the data

2.  Use a Crystal COMMAND as the source like
      SELECT RXS.RX#, RXS.Patient#, RXS.Facility#  FROM RXS
      UNION ALL
     SELECT HRXS.RX#, HRXS.Patient#, HRXS.Facility#  FROM HRXS

3.  Use the RXS table for the report and group on The common fields
      In the group footer insert a subreport that uses HRXS as its source and link on the common fields

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.