It is seems to be a very dummy question, but I cannot find a solution for it.
When I build a report with WPSuperMerge it creates an empty page after almost every page containing data. It looks like it happens if the group is not finished on the page.
The property IgnorePageHeight = true solves the problem, but I need it to be false :-(
I created a very simple test program
Code
procedure TForm3.WPSuperMerge1AfterProcessGroup(Sender: TWPSuperMerge;
Band: TWPBand; var CustomData: TObject; var Abort: Boolean);
begin
if Band.Alias <> '' then
Table1.Next;
end;
procedure TForm3.WPSuperMerge1BeforeProcessGroup(Sender: TWPSuperMerge;
Band: TWPBand; Count: Integer; var CustomData: TObject; var ProcessGroup,
IsLastRun: Boolean);
begin
if Band.Alias<> '' then begin
ProcessGroup := not Table1.EOF;
IsLastRun := Count=Table1.RecordCount;
end else begin
ProcessGroup := Count = 1;
IsLastRun := true;
end;
end;
procedure TForm3.FormShow(Sender: TObject);
begin
WPSource.LoadFromFile('c:\temp\test.rtf');
EvalEngine.AddDataSet('Vendor', Table1);
end;
procedure TForm3.Button1Click(Sender: TObject);
begin
WPRichDest.Clear;
WPSuperMerge1.Execute;
WPPreviewDlg1.Execute;
end;
Alles anzeigen
The document contain just one group and one field between it.
What am I doing wrong?
Any help will very be appreciated.