Problem <Page> =<TotalPages#>

edited December 2013 in FastReport 4.0
Hello im try to show some fiels in last page only on pagefooter
i try to code something like this

IF <Page> =<TotalPages#> THEN
Memo1.VISIBLE=TRUE
Memo2.VISIBLE=TRUE
else
Memo1.VISIBLE=FALSE
Memo2.VISIBLE=FALSE
end if

but not work


I try and code funcion on text object like this

[IIF(<Page#>=<TotalPages#>,"Ok","Not Ok")]

and did not work

always return the one stage in all pages "Not Ok"

what can i do , is any setting to check ?


edit
IF <Page#> =<TotalPages#> THEN
IF <Page> =<TotalPages> THEN
not work too

Comments

  • edited December 2013
    Hire is the Resolved code in PageFooter1 event PageFooter1OnBeforePrint and doublepass true in start of code editor ....
    'the magic key to work 
    report.engineoptions.doublepass = true   
    
    sub PageFooter1OnBeforePrint(Sender)
             Memo1.VISIBLE=(<Page#> = <TotalPages#>)
             Memo2.VISIBLE=(<Page#> = <TotalPages#>)
    end sub
    
    or the same code
    report.engineoptions.doublepass = true   
    sub PageFooter1OnBeforePrint(Sender)
     IF <Page#>=<TotalPages#> THEN
          Memo1.VISIBLE=TRUE
          Memo2.VISIBLE=TRUE
     else
         Memo1.VISIBLE=FALSE
         Memo2.VISIBLE=FALSE
     end if
    end sub
    
    Working perfectly for me

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.