Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QuickReports and QRRTFFilter

Status
Not open for further replies.

msgopala

Programmer
Oct 30, 2008
43
US
thread101-935624


Need to export file as word. The report already exports to pdf using QRPDFFilter successfully.

Cannot seem to export using the rtf filter.


~~~~Code for export to RTF does not work ~~~~~~~~
**Error Line**

procedure TrpFile.FileCreateRTF;
var
RTFFilter : TQRRTFFileFilter;
RTFFileName : string;
RTFFilePath : string;
RTFFile : string;
SDate : String;

begin
with Database do
begin
SDate := ReplaceString(SystemDate, '/', '-');
RTFFilePath := '\\path\company\Shared Files\File\';
RTFFileName := '';
RTFFileName := 'File_' + SDate + '.doc';
RTFFile := RTFFilePath + RTFFileName;
**RTFFilter := TQRRTFFilter.Create(RTFFile);**
rpFile.ExportToFilter(RTFFilter);
RTFFilter.free;
end;
end;

~~ Code for export to Pdf that works ~~~

procedure TrpFile.FileCreatePDF;
var
PDFFilter : TQRPDFDocumentFilter;
PDFFileName : string;
PDFFilePath : string;
SDate : String;

begin
with Database do
begin
SDate := ReplaceString(SystemDate, '/', '-');
PDFFilePath := '\\win2003a\company\Shared Files\File';
PDFFileName := '';
PDFFileName := 'File_' + SDate + '.pdf';
PDFFilter := TQRPDFDocumentFilter.Create( PDFFilePath + PDFFileName);
rpFile.ExportToFilter(PDFFilter);
PDFFilter.free;
end;
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top