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;
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
try this
TfrxRichView(frxReport1.FindObject('Rich1')).RichEdit.LoadFromStream(memStream);