문제

In fastreport VCL 4 is there a way to set headers visibility only on odd pages of report? Found no answer on google, neither on fastreport's site, documentation & forum.

도움이 되었습니까?

해결책

You do it in code. In your page object's OnBeforePrint event, you put some code sort of like this:

procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);
begin
  PageHeader1.Visible := (Frac(<Page#> / 2) > 0.01)                                                                                                                                   
end;

Maybe there is an easier way to figure out whether you are on an odd page or not, but I resorted to the Frac function because they don't have a Mod function. In practice, I would probably add that function within my own code and make it accessible within the report.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top