Report Viewer Control - How to Define a Report Layout for a Looping Layout RRS feed

  • Question

  • User-1078520054 posted

    I need to build a report and not sure how to go about doing it.

    The report will have data ordered by State such as:

    "Part    State  Code  Unit Cost   Quantity   Total Cost"

    I want to create a report, that on each page, it prints a table of the first state.  When that state's records end, a totals is printed.  Once that total is printer, put in a page break, and the second page, print the next state's records, followed by the totals, etc. until the end of the records.

    This would be easy if it was just one state.  A simple table, no problem.  But I am not sure how to cause a break between each state, print the totals by Code (Code Total Cost) and then move onto the next state.

    The recordset looks as such:

    Part    State    Code    Quantity    UnitCost    Total Cost
    1-1     NY        12      1          1.00        1.00
    1-3     NY        12      3          5.00        15.00
    4-2     NY        23      2          10.00       20.00
    1-1     OH        12      6          1.00        6.00
    1-3     OH        12      3          5.00        15.00
    4-2     OH        23      8          10.00       80.00

    Then on the report viewe control, I need it to print as such display as: 

    Page 1:
    Part    State    Code    Quantity    Unit Cost    Total Cost
    1-1     NY        12     1           $1.00        $1.00
    1-3     NY        12     3           $5.00        $15.00
    4-2     NY        23     2           $10.00       $20.00
                                                12 - $16.00
                                                23 - $20.00

    Page 2:
    Part    State    Code    Quantity    Unit Cost    Total Cost
    1-1     OH        12     6           $1.00        $6.00
    1-3     OH        12     3           $5.00        $15.00
    4-2     OH        23     8           $10.00       $80.00
                                                12 - $21.00
                                                23 - $80.00

    Would love some advice or help on this.

    Thursday, April 24, 2014 11:18 AM


  • User-734925760 posted


    According to your description, you want to page by state.

    So far as I know, as we add a table A to the report, if we want to group by the state, we can add a parent Group to table A, the same time we should select to disply the Group footer, then we can right click the Row Group to select Group Properties, then we can add page breaks. For more information, please refer to the image below:

    As you want to display the sum to the footer, so please refer to the link below, it will tell us how to add group row to the footer:


    Hope it's useful for you.

    Best Regards,

    Michelle Ge

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 25, 2014 4:13 AM