Function TWPSuperMerge.Execute(InitPage:Boolean) : Boolean

Unit: WPRTEReport
Class: WPRTEReport.TWPSuperMerge

Parameters

  • InitPage:Boolean

Returns

The type of the result value is Boolean.

Description

This procedure starts the reporting process.
If you pass the parameter InitPage with the value true, the header and footer defined in the Source will be copied over to the destination and the destination will be cleared.
Otherwise you will need to copy the page size:
DestText.Clear; DestText.Header := SourceText.Header;
and also, unless the Destinating and Source texts use the same object copy the paragraph and number styles.
DestText.ParStyles.Assign( SourceText.ParStyles );
DestText.NumberStyles.Assign( SourceText.NumberStyles );

We recommend to create a global TWPRTFProps object and use it for the Destination and Source object: procedure TWPRepForm.SourceTextInitializedRTFData(Sender: TObject; var RTFDataObject: TWPRTFDataCollection; var RTFPropsObject: TWPRTFProps); begin if FAllProps=nil then FAllProps := TWPRTFProps.Create; RTFPropsObject := FAllProps; end; This code is used for OnInitializedRTFData of both TWPRichText objects! If you use this code please make sure you do not execute DestText.Clear but DestText.ClearEx(true,true,false).