Combining data from Current & History files on Crystal Report

I have 2 DBF files, one history and one current.  These 2 files are structured the same way.  I want to pull data from 2 file as if the information is in one table instead of 2.  I have and Employee File attached to each Transaction File (One Current and One History) using the employee ID as the relation with each.  I know I can setup 2 reports and have them print on the same report having one of them be a Subreport, but I would rather only have to put the filter in one instead have to key the filter in twice upon refresh.  Please help me figure this out.
Paula WardControllerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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:
You may be able to use a union query as the command.

Select Table1.* FROM Table1
UNION ALL
Select Table2.* FROM Table2

That will work if all tables are in the same database.  It may not work if they are different databases

If they are different database connections then I believe you will have to use a subreport for the history.

mlmcc
0
Paula WardControllerAuthor Commented:
All files are the same type DBF files (Foxpro...YUCK).  I use Crystal 10.  Where is the UNION ALL done, I've never seen this option or is the just a command that is available if you know about it.
0
mlmccCommented:
You would do it in the database command but sine they are separate DBF files, I don't think it will work.

mlmcc
0
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Paula WardControllerAuthor Commented:
Well if that won't work...I can do it with the subreport for the one of the sets of data.  They would both have the Parameter of Employee ID.  Can it be setup when we hit refresh that it only prompts for Employee ID once instead of twice?

0
mlmccCommented:
Yes.  I generally add the parameter to the main report then link the subreport on the related fields.

You can also link the subreport to the main report using the parameter fields.

mlmcc
0
James0628Commented:
If you basically want the same report (same fields in the same layout), but from two different sources (current and history), you could:

 Create a report for one source, with your employee parameter.
 Save a copy of that report under a different name.
 Change the datasource in the copy to the other DBF file (I'm assuming that this will work, but I don't use DBF files, so I can't say for sure).
 Add the second report as a subreport in the first report.
 Right-click on the subreport, select "Change Subreport Links", and link the parameter in the main report to the parameter in the sub report.

 James
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
mlmccCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
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.