Print Master Data Header after Group Header?

edited April 2011 in FastReport 4.0
In some reports we use grouping rather than Master Detail for order showing mainly for easier table export (1 table rather then several table)

So we would like to show
Page Header
  GroupHeader - no reprint in new page
    Header (Master Data) - reprint in new page
      Master Data
      Master Data
      ...
  Group Footer
Page Footer

May I know how can I achieve it?

Thanks for your kind help?

Comments

  • gpigpi
    edited 5:07AM
    Try to set Header1.ReprintOnNewPage to True
  • edited 5:07AM
    gpi wrote: »
    Try to set Header1.ReprintOnNewPage to True

    That one I know.

    The problem is The Header Band (Master Data) always appear BEFORE the Group Header Band but I want it AFTER the Header Band.

    Thanks a lot!

    Current :
    Item No   Description
    Order No : 123456
    Customer : ABC Company
    A111      A Good Item
    A112      A even better item
    
    What I want :
    Order No : 123456
    Customer : ABC Company
    Item No   Description
    A111      A Good Item
    A112      A even better item
    
  • edited 5:07AM
    Attach an example of your select statement and write what is the expression for the group band.
    Then it will be easier to keep on working at your issue [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Mick[/img]
  • gpigpi
    edited 5:07AM
    Try to add child band (as header) to GroupHeader band and use this script:
    var EndOfGroup :Boolean;                                                    
    procedure Child1OnAfterPrint(Sender: TfrxComponent);
    begin
         Child1.Visible := False;
         GroupHeader1.Visible := True;
    end;
    
    procedure PageFooter1OnAfterPrint(Sender: TfrxComponent);
    begin
         Child1.Visible := True;
         GroupHeader1.Visible := False;  
         if EndOfGroup then GroupHeader1.Visible := True;
    end;
    
    procedure GroupFooter1OnAfterPrint(Sender: TfrxComponent);
    begin
         EndOfGroup := True;                                        
    end;
    
    procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
    begin
         EndOfGroup := False;         
    end;
    
    begin
         GroupHeader1.ReprintOnNewPage := True;
         GroupHeader1.PrintChildIfInvisible := True;                                                       
    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.