質問

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