Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Comparing 2 tables in Delphi 1.0 or Reportsmith(sql)

Posted on 1997-10-17
2
Medium Priority
?
166 Views
Last Modified: 2010-04-04
hi....

I need to comapre 2 tables of same format(one old, one updated) the field values being yes/no. I need to produce a discepency report where only the unmatched fields are displayed.

I have an idea :
Take field values from both tables and place them in variables in Delphi then comparing them and outputting the unmatched variables to a new tempororay table that is eliminated after this report is generated.

How would you suggest that I solve this problem. Should I use Delphi 1.0 or should I use Reportsmith for processing.

Yours Sincerely
sprawler
0
Comment
Question by:sprawler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1347822
I have another idea,
Define in one of the tables an calculated field. Then in OnCalcFields Event. Check the two fields and place the result in the calculated field.

procedure TForm1.OnCalcFields..........;
begin
Table2.FieldByName([NoMatch]).AsBoolean :=
(Table1.FieldByName([Value]).AsString <> Table2.FieldByName([Value]).AsString)
end;

After this filter this table on all the values with nomatch = true;

Look out! Two tables have to be in sync.

For making report, it depends. If you want to make a very beautifull layout, you should use reportsmith or Quickreport. But if you use reportsmith you have to deploy that program as wel with your own program. If you just want to have a print-out, I advise to use Delphi. With Delphi you can also make beautiful reports but that takes a little more time and isn't so easy.
Wich program to process? Depends on which you take to make your report.
But if yuo plan to use the results also for other processing, use D1. I don't know if you know it but you can also use sql in D1, not only in reportsmith.

Have fun,
c.u. ZifNab;
0
 

Author Comment

by:sprawler
ID: 1347823
Hi ...

 That is a good idea ....

I do now about the SQL capabilities of Delphi but I am not fully clued up on SQL code. If possible, would you pleez suggest how
I shoul make use of the SQL. An example will help tremendously.

Tanx
sprawler


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question