Solved

Comparing 2 tables in Delphi 1.0 or Reportsmith(sql)

Posted on 1997-10-17
2
161 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
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
oracle global variables 4 68
Dev Express grid collapse 2 44
Convert MS Word document to a PDF file 9 78
I want to use librsync in my Delphi backup application. 3 45
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

786 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