Problem with RowNumber Page Break RRS feed

  • Question

  • I've created a report to generate bills by account number

    I have tablix1 which is group by account number (page back after between each group). This table has a footer which would be my bill stub. Inside the tablix (header) I added another table tablix2 that has the headers the will repeat on each page. The tablix2 is groups by a rownumber break after each group. My problem occurs on the page break for tablix2.


    Details (rownumber)

    ----Page break should occur here -----




    Instead I get this:





    --- Page Break ---


    Anyone gave me a suggestion on how to get it to actually create the page break which would place the 2nd Header and Details on a second page instead of the first page.

    Should I be doing this differently?

    Also how can I get the row count for each page instead of each account number group?

    I'm new at SQL Reports (currently using SQL 2008 R2)


    Thursday, March 8, 2012 4:39 AM


  • I solved my issue

    Here's my solution:

    I created a list(tablix) in which I grouped on account number (page breaking between each group) with a
    group footer (group name: AcctLevel)

    Within the data region I placed a tablix which is grouped on an expression
    INT(Ceiling(RowNumber(“AcctLevel”)/12)) page breaking between each group (group name: BillDetails)

    This will display 12 rows per page. This tablix has a group header which is repeated on everypage.

    In the group footer of the list (AcctLevel), I have added 12 blank rows plus the rectangle that will hold the
    bill stub.

    The row visibility property on these blank rows are set on an expression
    =Code.SetVisibility(CountRows(“AcctLevel”),[number of this row]) …1,2,3,4,5,6,7,8….

    Code.SetVisibility is custom code I created on the report.

    **** CUTOM CODE ******

    Shared bHide as Boolean

    Dim iNewLineNumber as Integer

    Public Function SetVisibility(numoflines as integer, linenumber as integer) as Boolean

    iNewLineNumber = numoflines mod 12

    if iNewLineNumber >= linenumber then

    bHide = true


    bHide = false


    return bHide

    End Function

    To have the page number(s) set within each group.  (ex:  a group has 3 pages then the Page Number would display Page 1 of 3, Page 2 of 3,Page 3 of 3)

    The page number will reset to 1 on the next group. (ex: if next group has two pages then the Page Number would
    display Page 1 of 2, Page 2 of 2)

    This is done by setting the PageBreak Property on the “AcctLevel” group. Page Break: between and
    ResetPageNumber: true and PageName = Fields!acct_num.Value

    So now the group footer (Bill stub) is aligned to the bottom of last page of each group. And each group has page numbers


    • Marked as answer by sbrazier Friday, March 9, 2012 1:38 PM
    Friday, March 9, 2012 1:37 PM