BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Quickreport export to XLS

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting
View previous topic :: View next topic  
Author Message
camperos
Guest





PostPosted: Mon Mar 12, 2007 5:42 pm    Post subject: Quickreport export to XLS Reply with quote



Hi
I using D7 and QR 4.06
How I can automatically export one report to a XLS file without user interaction ?

I fond the "Incompatible types TComponent and String" error.

Using the QR help for the HTML export filter I write the following code:
------------------------------------
Var
ExcelFile: string;
XLSfilter: TQRExcelFilter;
begin
QRExcel:=TQRExcel.Create(Self);
QRExcel.ShowProgress:=False;
QRExcel.Prepare;

ExcelFile:='test.xls';
XLSfilter:=TQRExcelFilter.Create(ExcelFile); <== error ! Incompatible types TComponent and String
QRExcel.ExportToFilter(XLSfilter);
.....

Thanks

C.
Back to top
camperos
Guest





PostPosted: Tue Mar 13, 2007 1:55 pm    Post subject: Re: Quickreport export to XLS Reply with quote



Hi to all
I find the following solution:
(very simple !)

procedure TForm.....
Var
ExcelFile: string;
XLSfilter: TQRExcelFilter;
begin
QRExcel:=TQRExcel.Create(Self);
QRExcel.ShowProgress:=False;
QRExcel.Prepare;

ExcelFile:=ExtractFilePath(Application.ExeName)+ FormatDateTime('yyyymmdd', date) +'.xls';

QRExcel.ExportToFilter(TQRXLSFilter.Create(ExcelFile));

finally
QRExcel.Free;
QRExcel:=nil;
end;

end;


Cheer .... :-)

C.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.