Seting duplex from code

edited 2:57PM 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 2:57PM
    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 2:57PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.