OLEObject FastReport
Hi
I am writing a program in Delphi 2010, but I need professional help. Program which I try to write is designed to create a report after filling form fields.
I have a problem with sending to the FastReport component Tolecontainer field values, which loads files for example MS Excel. The user can create a new worksheet MS Excel or filling an existing one.
The only thing I found in web is:
procedure TForm1.frxReport1AfterPrint(Sender: TfrxReportComponent);
var
a: TFileStream;
begin
a := TFileStream.create('C:\Users\piotr\Documents\wstep.doc', fmOpenRead);
OLE1.LoadFromStream(a);
end;
Unfortunately, this solution does not work. It displays ERROR:
"Project1.exe raised exception class EoleError witch message" Invalid stream format"
Please, can someone help?
I am writing a program in Delphi 2010, but I need professional help. Program which I try to write is designed to create a report after filling form fields.
I have a problem with sending to the FastReport component Tolecontainer field values, which loads files for example MS Excel. The user can create a new worksheet MS Excel or filling an existing one.
The only thing I found in web is:
procedure TForm1.frxReport1AfterPrint(Sender: TfrxReportComponent);
var
a: TFileStream;
begin
a := TFileStream.create('C:\Users\piotr\Documents\wstep.doc', fmOpenRead);
OLE1.LoadFromStream(a);
end;
Unfortunately, this solution does not work. It displays ERROR:
"Project1.exe raised exception class EoleError witch message" Invalid stream format"
Please, can someone help?