Multiple instances of a subreport

Posted by: mahe_adifo on 4 August 2017, 2:53 pm EST

  • Posted 4 August 2017, 2:53 pm EST

    Hi,

    I would like to create a main report with one subreport.

    I have a fieldlist for my subreport as follows

    Field1
    Name_0
    Value_0
    Name_1
    Value_1
    ...
    Name_x
    Value_x

    In which x is variable

    I want to make this layout

            Name_0    Name_1  ...     Name_x
                    -------------------------------
    Field1        Value_0 Value_1 ...     Value_x
    Field1        Value_0 Value_1 ...     Value_x
    Field1        Value_0 Value_1 ...     Value_x

    Because the width of the page is restricted, I need to repeat the subreport. Let's assume that the page is
    wide enough for 5 columns 'Name_x'.

    The first instance of the subreport is then like this

            Name_0    Name_1  Name_2  Name_3  Name_4  Name_5
                    -----------------------------------------------
    Field1        Value_0 Value_1 Value_2 Value_3 Value_4 Value_5
    Field1        Value_0 Value_1 Value_2 Value_3 Value_4 Value_5
    Field1        Value_0 Value_1 Value_2 Value_3 Value_4 Value_5

    And the second instance is like this

            Name_6    Name_7  Name_8  Name_9  Name_10  Name_11
                    -------------------------------------------------
    Field1        Value_6    Value_7    Value_8 Value_9 Value_10 Value_11
    Field1        Value_6    Value_7    Value_8 Value_9 Value_10 Value_11
    Field1        Value_6    Value_7    Value_8 Value_9 Value_10 Value_11

    and so on ...

    I could make this with several subreports but this is really difficult to maintain well. I also don't know
    the total number of columns I need, because this is variable.

    How can I make the subreport repeat itself ?
    How do I know which instance of the subreport is active. In this way I know by which field I have to replace the controls
    DataField property.

    Thanks
  • Replied 4 August 2017, 2:53 pm EST

    The closest that you can get to this type of layout is to create multiple columns in your detail sections(ColumnCount property) and set the ColumnDirection to AccrossDown.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels