I want to create a new base document (WPRichTextSource) containing a number of templates (TWPRichText). These templates are documents that have reportgroups and bands within.
How do I copy this templatedocument into the newly created databand ?
Thanks in advance,
Ad Franse
procedure AppendText( template : TWPRichText; databasename : string );
var mastergroup : TParagraph;
var target : TParagraph;
var source : TParagraph;
var lNewPage : boolean;
begin
WPRichTextSource.CheckHasBody;
wpsupermerge1.Source.cursor.Position := $7fffffff;
lNewPage := wpsupermerge1.source.Cursor.Position > 0;
mastergroup := WPSuperMerge1.AddReportGroup( databaseName, [wpCreateBorders ], nil, SetCellStyle, 2);
mastergroup.IsNewPage := lNewPage;
target := mastergroup.AppendChild(nil);
target.ParagraphType := wpIsReportDataBand;
// how do I add the contents of template (TWPRichText) to this reportdataband ?
// note it is possible that this document contains also reportbands, headers and footers
//
end;