I managed to export the contents of my formatted Rich Edit component with custom tab spacing.
In FastReports I used a tfrxRichView box. This problem is that when you send it to FastReports via the OnGetValue Event, it loses its custom tab spacing.
I solved this by saving the contents of my Rich Edit to a .rtf file
redInvoice.Lines.SaveToFile('Invoice - ' + sInvoice + '.rtf');
Then I opened the .rtf file in FastReports tfrxRichView box.
RichView := TfrxRichView(frxReport1.FindObject('Rich1'));
if RichView = nil then
Exit;
Stream := TMemoryStream.Create;
try
Stream.LoadFromFile('Invoice - ' + sInvoice + '.rtf');
SetLength(Str, Stream.Size);
Stream.Read(Str[1], Stream.Size);
RichView.RichEdit.Text := Str;
finally // wrap up
Stream.Free;
end; // try/finally
Finally, I exported it to PDF. "ExportPDF" is method I made to hold the lengthy export code.
frxUserDataSet1.RangeEnd := recount;
frxUserDataSet1.RangeEndCount := redInvoice.Lines.Count;
try
ExportPDF;
Showmessage('Invoice published.');
except
showmessage('Error - Invoice not published.');
end;
Yes you need to use a frxUserDataSet on your MasterData section in FastReports.