ssrs 2012 Display specific # of rows with specific row count

  • I am needing to display 5 rows in a table on 1 page and whatever # of rows are in the rest of the table, on 2nd page. I do understand how to set page break at a specific # of rows, but my problem is on the 2nd page I have to display a banner before the 2nd page of table can start. I believe what I need to do is create a separate table that starts on row 6 (or in my case, QuestionNumber 6), but I am unable to figure out how to do this.

    Any help is appreciated.

  • Would it be an option to just create two different queries?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • I don't know what you are using as your dataset but you could just have two sources.

    I'm just using pseudo code here but something like...

    SELECT TOP 5 Question, Answer FROM Survey ORDER BY QuestionNumber

    SELECT COUNT(QuestionNumber)-5 AS RemainingQuestions FROM Survey

    You shouldn't look to have them in the same 'table' or data source since they have different structures. One shows the data while the other shows the number of records remaining.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • No, unfortunately I will not be able to change the dataset.

  • I should probably clarify; the 1st table will display 5 rows of data, and the 2nd table will also display rows of data, although the # of rows will vary.

    So, for the 2nd table I don't need a count, I just want the display to start with QuestionNumber 6. Sorry if 1st post was misleading.

  • lskidgel (6/24/2015)


    I should probably clarify; the 1st table will display 5 rows of data, and the 2nd table will also display rows of data, although the # of rows will vary.

    So, for the 2nd table I don't need a count, I just want the display to start with QuestionNumber 6. Sorry if 1st post was misleading.

    Ahhh...well it just sounds like you need to just repeat the header. Should be an option to do just that.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • "Ahhh...well it just sounds like you need to just repeat the header. Should be an option to do just that. "

    Not sure what you mean by that, but no, repeating a header does not fix my issue. I need to know how to display a specific start point in a table, such as, start displaying data rows at QuestionNumber 6.

    Edit: I solved my issue with what should have been an obvious solution to me. I simply created a copy of 1st table and used hidden expression IIF(RowNumber(Nothing) >= 5,true, false)

    Thank you for your efforts and your time.

  • lskidgel (6/25/2015)


    "Ahhh...well it just sounds like you need to just repeat the header. Should be an option to do just that. "

    Not sure what you mean by that, but no, repeating a header does not fix my issue. I need to know how to display a specific start point in a table, such as, start displaying data rows at QuestionNumber 6.

    Edit: I solved my issue with what should have been an obvious solution to me. I simply created a copy of 1st table and used hidden expression IIF(RowNumber(Nothing) >= 5,true, false)

    Thank you for your efforts and your time.

    That is indeed a simple solution 😀

    Thanks for posting back!

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply