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;
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;