something strange

hello,

I wrote this on a code report:
procedure Header1OnBeforePrint(Sender: TfrxComponent);
begin
  if engine.freespace < (fr01cm * 20)                                                     
  then engine.newpage;
end;

procedure Child1OnBeforePrint(Sender: TfrxComponent);
begin
child1.visible:=Length( Trim(<frxDBDataset2."LCDETAIL"> ) ) > 0;
end;

The second procedure is running ok , but nothing appears concerning the procedure "Header1OnBeforePrint"
it seems that the compiler doesn't read the code [img]style_emoticons/<#EMO_DIR#>/mad.gif" style="vertical-align:middle" emoid=":angry:" border="0" alt="mad.gif" /> I try to set[/img]
if engine.freespace < (fr01cm * 50)  then engine.newpage;
to see what's happen but it is the same ?

Sure that there is something wrong but I dont see ?

regards






Comments

  • gpigpi
    edited 3:20PM
    Try
    procedure Header1OnBeforePrint(Sender: TfrxComponent);
    begin
      //if engine.freespace < (fr01cm * 20)                                                    
      //then
     engine.newpage;
    end;
    
    What result did you get?
  • edited 3:20PM
    hello

    I tried your code and here is the result:

    1 page empty / 1 page OK / 1 page empty / 1 page OK / .... and so on


    regards
  • edited 3:20PM
    Hi.

    Try 'fr1cm' instead of 'fr01cm'.

    Petter

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.