First row of page question (expression) RRS feed

  • Question

  • Is there any way to have a value only show up on the first row of a page (may not be first row in a group or table)?

    e.g. what I'm using for top row of group - want something similar for top row on page:

    =iif(RowNumber("MYGROUP")=1, "$", "")

    Friday, April 19, 2013 5:18 PM


  • The RowNumber function in SSRS refers to the row number of the dataset that is in scope. the scope can be a datset as well as a group. If a table spans multiple pages, subsequent pages data will likely start at some row number higher than 1. If you have tight control of the data display, you can possibly do this with a formula. If all of my data always fits in a single line, never wraps causing the line to grow vertically, I can then use a little math to determine how many records will be displayed on a page. For instance:

    My report is 8.5 x 11 with 1" top and bottom margin + header/footer. Each report line is .25". 4 lines/inch X 9 inches is 36 lines. I can then say hide:

    = IIf((RowNumber("scope") -1) Mod 36 = 0,false, true)

    This relies on knowing the number of records that will be displayed on each page.

    "You will find a fortune, though it will not be the one you seek." - Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

    • Proposed as answer by Charlie Liao Tuesday, April 23, 2013 7:01 AM
    • Marked as answer by Charlie Liao Monday, April 29, 2013 1:24 AM
    Friday, April 19, 2013 7:25 PM