Hello
Some assistance from the professionals
please.
I'm using D5 Pro and Paradox.
I have a need to flag dockets as invoiced as
each invoice is generated in Quick Reports.
What I am doing is as follows:
Execute a multitable TQuery to assemble data
for all dockets to be invoiced
Sort them by Customer
Call the QR Customer Invoice
report
On each change of Customer increment the
Invoice No.
In the Detail band (ie on every record) write
the Invoice No back to the current record, using the following
code:
with
MainDataModule.DocketsTable
do
begin
filter := '(DocketNo =
'
+
QuotedStr(QueryDataModule.CustRepQ.FieldByName('DocketNo').AsString)
+ ') AND(DocketCheck =
'
+ QuotedStr(QueryDataModule.CustRepQ.FieldByName
'DocketCheck').AsString)
+ ')';
Filtered :=
True;
FindFirst;
Edit;
FieldByName('CustInvFlag').AsInteger :=
InvNo;
Post;
DBISaveChanges(Handle);
end;
Apparently this is taking 30 minutes to run in
aproduction situation.
Is there a better way to do this that will be
faster - without getting too complicated.
I understand that I can't use RequestLive on
the Query because it involves several tables.
Thanks
Mark