How can I use this RichEdit text from the BLOB

I save RichtEdit(RTF)texts by stream into an SQL Blob(varbinary(max)).
How can I use this RichEdit text from the BLOB with FastReport.

The Error Message: "Invalid file format" from my Sample:

Var
memStream: TMemoryStream;
begin
// Datenmenge auf aktuellen rbCurrent
try
frxDBDataset_xGrid.RangeBegin := rbCurrent;
frxDBDataset_xGrid.RangeEnd := reCurrent;

memStream := TMemoryStream.create;
Qry1RichBlob.SaveToStream(memStream);
memStream.Position := 0;

TfrxMemoView(frxReport_xGrid.FindObject('Rich1')).LoadFromStream(memStream);
// Drucke Report
if frxReport_xGrid.PrepareReport then
frxReport_xGrid.ShowPreparedReport;
finally
memStream.Free;
end;
end;

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 1:30PM
    first get the correct object then the correct property.
    try this
    TfrxRichView(frxReport1.FindObject('Rich1')).RichEdit.LoadFromStream(memStream);

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.