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 8:30PM
    first get the correct object then the correct property.
    try this
    TfrxRichView(frxReport1.FindObject('Rich1')).RichEdit.LoadFromStream(memStream);

Leave a Comment