Seting duplex from code

edited 5:40PM in FastReport 4.0
On my report page1 I have default setting duplex=dmVertical. I try with the next code from page footer to turn off duplex without success:
procedure PageFooter1OnBeforePrint(Sender: TfrxComponent);
begin
  if engine.finalpass and (engine.totalpages = 1) then
    page1.duplex := dmNone;                                                               
end;
I also tried with "report.page1.duplex := dmNone" with no success;

If I use "page1.duplex := dmNone;" from main procedure (before first pass) works fine

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:40PM
    once you have started processing the page it is to late to change props.
    use something else in the main procedure to determine the duplex setting.
    perhaps record count of a dataset.
  • edited 5:40PM
    Dont' understand why cannot change props between or after processing pages - if I manually change props from preview > edit page change of duplex is used as I expect

Leave a Comment