Re: QuickReport and TIdTCPServer.



QuickReport is not thread safe.
Here things to do
1. Set ShowProgress property to False
2. Change qr source code to not creating progress when ShowProgress is False

Cheer,
A Pham

"Massimo Bolzoni" <massimo.bolzoni@xxxxxxxxxxxx> wrote in message
news:44f6db6a$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I have a routine that makes a PDF file from a report
by QuickReport:

procedure TformAS_PDFReport.MakePDFFile(qR: TQuickRep; FileName: string);
var
aPDFFilt : TQRPDFDocumentFilter;
begin
aPDFFilt := TQRPDFDocumentFilter.Create(FileName);
try
// set filter properties
aPDFFilt.TextOnTop := true;
aPDFFilt.LeftMargin := -10;
qR.ExportToFilter(aPDFFilt);
finally
aPDFFilt.Free;
end;//try
end;//MakePDF

It works fine when called from a button handler;
the correct PDF file is generated.

Instead, when I call it in the Execute event of TIdTCPServer
the execution fails: infact the debugger stops in the
ExportToFilter function at the line
AProgress := TQRProgressForm.Create(Application); (QuickRpt.pas file)

Can anybody tell me why the function fails when executing
in the Execute event of TIdTCPServer?
Perhaps is there any problem because of thread architecture
of TIdTCPServer component?

Thanks to all, Massimo.




.