Demo mailmerge-text3

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
Gwiasda
Posts: 11
Joined: Mon Feb 16, 2015 3:15 pm

Demo mailmerge-text3

Post by Gwiasda »

This demo supports »multiline text, pictures and tables«. It’s ok and works fine. It’s possible to supports blob fields too?
I have makes a template in ScaleRichView and the field values are in a database. All fields appear on the right position, but not the blob field. The blob field appear always on the end.

My code:
function TDMFDPrgHeft.LoadBlobData : TMemoryStream;
begin
Result := TMemoryStream.Create;
try
if FDQPrgHeftPrgKuText is TBlobField then
begin
TBlobField(FDQPrgHeftPrgKuText).SaveToStream(Result);
Result.Position := 0;
end;
except
Result.Free;
Result := nil;
end;
end;

procedure TDMFDPrgHeft.InsertBlobItem (RVData : TCustomRVData;
var ItemNo,
Pos : Integer);
var Stream : TMemoryStream;

begin
Stream := LoadBlobData;
if Stream<>nil then
RVData.LoadRTFFromStream(Stream);
end;
Post Reply