Before/After GroupBreak paging problem.
(Ver. 7.03)
What am I doing wrong?. I'm trying to print a stretchable memo containing
address information in a report header. Only I want to print the address for
the first page in each group. I've coded the following:
procedure TdmrSpecialtyClubPlacement.ppGroupBreedBeforeGroupBreak(Sender:
TObject);
begin
ppMemoSecretary.Visible := False;
end;
procedure TdmrSpecialtyClubPlacement.ppGroupBreedAfterGroupBreak(Sender:
TObject);
begin
ppMemoSecretary.Visible := True;
end;
The thought being I would flip the ppMemo off except after a group break.
The problem is that RB keeps losing track of where it's breaking. For
example, the first page preview properly displays the address info. But if I
click on page 6 then back to page 1 RB doesn't seem to be able to realize
it's back to the beginning of a group again. Same thing happens when
printing on pages with data that goes very close to the page length.
Sometimes the header memo prints, other times it does not.
Am I doing this wrong? If so, where should I be setting the ppMemo's visible
attribute on and off?
Thanks,
Robert Gesswein
What am I doing wrong?. I'm trying to print a stretchable memo containing
address information in a report header. Only I want to print the address for
the first page in each group. I've coded the following:
procedure TdmrSpecialtyClubPlacement.ppGroupBreedBeforeGroupBreak(Sender:
TObject);
begin
ppMemoSecretary.Visible := False;
end;
procedure TdmrSpecialtyClubPlacement.ppGroupBreedAfterGroupBreak(Sender:
TObject);
begin
ppMemoSecretary.Visible := True;
end;
The thought being I would flip the ppMemo off except after a group break.
The problem is that RB keeps losing track of where it's breaking. For
example, the first page preview properly displays the address info. But if I
click on page 6 then back to page 1 RB doesn't seem to be able to realize
it's back to the beginning of a group again. Same thing happens when
printing on pages with data that goes very close to the page length.
Sometimes the header memo prints, other times it does not.
Am I doing this wrong? If so, where should I be setting the ppMemo's visible
attribute on and off?
Thanks,
Robert Gesswein
This discussion has been closed.
Comments
As a test try placing a break point inside the BeforeGroupBreak and
AfterGroupBreak events and see how many times they fire per actual group
break. There is a definite possibility that they will fire more than once.
Try placing a TppVariable in your detail band and setting the visibility of
the memo in the OnCalc event of the variable. You will then need to adjust
the Timing of the TppVarible to before the group breaks or after the group
breaks. The OnCalc event of the TppVariable component will only fire once
and the timing may be better for your needs.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Another thought... You may try to place your memo in the group header band
and use the GroupHeaderBand.BeforePrint event to toggle the visibility of
the memo.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com