How To Limit Number Of Rows Displayed In A Rdl Without Change SQL Statement?

  • Hi Friends,

    I need help on SSRS 2005 report

    I am doing a report in SSRS 2005, I have Services drop down menu with "ALL" option when I select ALL from drop down menu and execute

    I am getting more than 20,000 records, End user asking like

    It has to show a message that shows up at the top of the result that says something like “More than 10,000 services returned. Please limit services or It has to limit the no.of rows up to 10,000

    Can you please help me out on this

    Thanks

    Kaladhar

  • I haven't tested this, but off the top of my head you could use the RowCount and RowNumber functions.

    In the filter for the details you could use RowNumber(group) to filter anything with a row number that is greater than 10000. As for displaying a message at the beginning or end, you could use the RowCount(datasource) to show the message or not.

    I'm not 100% sure if Row Number will give you the current row that its working on, of the row current row of generated rows on the table. (IE if the details had two rows displayed per actual data row you may see odd results, but I'm not sure)

    Josh

Viewing 2 posts - 1 through 1 (of 1 total)

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