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