assigning two child bands?

edited 3:18AM in FastReport 4.0
I want to display optional additional information to MasterData.

One is a comment that I placed in a child band. The user can choose before report generation if he wants to display this information.
If he choses not, the child band will not be displayed. This works.

I want to do the same with photos that are connected with each masterdata row but even though I can add a 2nd child band to the report, I can only assign one child to the masterdata band.
Is it not possible to assign two childs to one masterdata?

How to proceed?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 3:18AM
    ChildBands can only be chained to each other what you probably should be doing is setting the visible property for the child
  • gpigpi
    edited 3:18AM
    procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
    begin
      if <Line> mod 2 = 0 then MasterData1.Child := Child1 else MasterData1.Child := Child2;                                                                                                                                  
    end;
    
  • edited 3:18AM
    Thanks for your advices but they do not adress my problem.
    The two child bands shall be independent from each other. That means that the user should be able to activate child band 1 or band 2 or also both.

    When I set Child2 as child of Child1, Child2 will be invisible when Child1 is opted out.
    Also, setting one child instead of the other doesn't help as this will not allow to show both band.

    Currently this runs smoothly with Quickreport which I am working to convert to FR.
    In Quickreport I use a Subdetail and a Child band but FR does not allow me to use Subdetail.
    It keeps on telling my that the band is in the wrong place.
  • gordkgordk St.Catherines On. Canada.
    edited 3:18AM
    wrote:
    Currently this runs smoothly with Quickreport which I am working to convert to FR.
    In Quickreport I use a Subdetail and a Child band but FR does not allow me to use Subdetail.
    It keeps on telling my that the band is in the wrong place.
    lets solve the real problem
    place your header footer bands in ordered pairs above and below each data band
    h1
    md
    fi
    h2
    det
    f2
    h3
    sd
    f3
    or set free band placement prop
  • gpigpi
    edited 3:18AM
    wrote:
    The two child bands shall be independent from each other. That means that the user should be able to activate child band 1 or band 2 or also both.
    Add band. Add Child1 and Child2. Set Band.Child = Child1, Child1.Child = Child2, Child1.PrintChildIfInvisible = True
    wrote:
    In Quickreport I use a Subdetail and a Child band but FR does not allow me to use Subdetail.
    Use TfrxMasterData band. Read FR manual, see FRDemo
  • edited 3:18AM
    Child1.PrintChildIfInvisible = True
    

    solved my problem. Thank you very much!

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.