FR does not understand NewPage function.

I can't understand why FR fire my UserFunction when I try to execute NewPage.

I have the next code in a OBP group header band

if FreeSpace < (36 * 5) then
NewPage;

I try too with

if FreeSpace < 180 then
NewPage;

I try too in other bands...

But always it fire my UserFunction, It seems as if FR did not recognize the NewPage function.

Can anybody help me, please ;)

Comments

  • edited 6:09PM
    The problem is resolved!

    FR looks NewPage function before at TReport.OnUserfunction, later it executes.

    Then it is necessary to control that in event OnUserfunction the functions of FR do not do anything, something as well as:
      procedure TForm1.frReport1UserFunction(const Name: String;
         p1, p2, p3: Variant; var val: Variant);
      begin
        if AnsiCompareText('NEWPAGE', Name) = 0 then
           exit
        else
           .......... //Executes my functions
        else
           ShowMessage ('FR UserFunction not found');
      end;
    

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.