Memo [iif(<Page>=<Totalpages>,'T','F'] "False" on last Page?

Hi there,

i want a certain memo to show a Sum at the bottom of the Page as long as the final Page ist not reached.

This is My Memo With testing Fields:
[IIF(<TotalPages#>=<Page#>,'TRUE'+VarToStr(<Page>),'FALSE: Page'+VarToStr(<Page#>)+' TotalPage: '+VarToStr(<Totalpages#>))] 
//Testing Fields...
Page#: [Page#]  Page: [Page]
TotalPage#: [totalpages#] TotalPage: [totalpages]

And now im getting this weird Results:
Site1:
FALSE: Page1 TotalPage: 0
//Testing Fields...
Page#: 1 Page: 1
TotalPage#: 2 TotalPage: 0

Site2:
aoFALSE:
Page2 TotalPage: 0
//Testing Fields...
Page#: 2 Page: 2
TotalPage#: 2 TotalPage: 0


i know there is a slightly difference between Pages with '#' and without. Anyway it does not work even if i switch between # and without #.

Somehow the Systemvar for TOTALPAGE# das not work when its used in a IIF Expression?

in my first research i found that other ppl. have the same issue but i cant handle their workrounds since im quite newbie to FR... and i dont know what to do... so.. if This SysVar is not Valid for MemoFields and a Workaround must be used to reach the desired results, could someone pls explain what to do instead, StepbyStep?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:04AM
    try adding an extra set of braces here
    [IIF((<TotalPages#> = <Page#>), .....
    also report must be 2 pass report
  • edited January 2016
    OK, i checked 2 Pass in the Setting.

    But for some Reason the Page Header is missing since 2 pass is checked.

    the following code should make the Header invisible if the Page ist NOT Page 1:
    procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);
    begin
    if <Page#><>1 then PageHeader1.Visible:=False;      
    end;
    

    why does this not work anymore? Page Number 1 should still be Page Number 1 IMO >>
  • edited January 2016
    EDIT:

    OK my expression now works with that:
    wrote:
    if <Page#>=1
    then PageHeader1.Visible:=TRUE
    else PageHeader1.Visible:=FALSE;


    ty so far

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.