How do I force a report to always insert a page break?

17,960

Maybe these links could help you.

Goodluck!

Update by original poster

Reading all the instructions on the previous pages, I found the a solution. My main report tablix needed to be grouped into individual rows, and those row groups needed page breaks.

To add a page break to a grouping in a table

  • In Layout view, click the table so that column and row handles appear above and next to the table.
  • Right-click the row handle on the right side of your row group Tablix, go into the Row Group submenu, and then click Group Properties....
  • The Tablix needs to be grouped by the rows you want page breaks between. On the General tab, add a Group on expression. In my case, it was VehicleID.
  • On the Page Breaks tab, click Between each instance of the group
  • Click OK
Share:
17,960

Related videos on Youtube

Gustav Bertram
Author by

Gustav Bertram

I'm an engineering manager and software engineer with about 18 years of web dev experience. When I'm not writing code and learning more about Agile, DevOps and Lean, I hack Common Lisp for fun. My favorite tools are Emacs, a nice big whiteboard, and the Microsoft Sculpt Ergonomic Keyboard.

Updated on June 30, 2022

Comments

  • Gustav Bertram
    Gustav Bertram almost 2 years

    I created a report in Visual Studio 2012 that has two report definitions. The main report section repeats once per vehicle, and it has a subreport that repeats once for each delivery that vehicle has.

    The main report design looks as follows:

    enter image description here

    The orange bar on the left side indicates that the rectangle on which I have all the other elements located is selected.

    I have set the following properties on it:

    enter image description here

    I have also set Add a page break before and Add a page break after on the Tablix that contains the other elements:

    enter image description here

    There is no other Rectangle or Tablix on this report design.

    My problem is that it doesn't always do a page-break before and after. On pages with only a little information, it puts each vehicle on the same page, as follows:

    enter image description here

    But when a vehicle is longer than a single page, it spills into the next page, and the next vehicle does not add a page break before it, like so:

    enter image description here

    How can I force the report to always insert a page break before a new vehicle?

  • bonCodigo
    bonCodigo over 9 years
    I am using 2010 VSRD. Is it possible to access and set the pagebreaks (by groups, by row number) programmatically and count total number of pages per report?