none
Table row count RRS feed

  • Question

  • Hi,

    In one of my SSRS 2008 reports I have a table called "table1" I want to do a row count and desplay it in a text box at the top of my report. What's the conditional formatting for this?

    Cheers

    Paul

    Tuesday, August 20, 2013 2:30 PM

Answers

  • Hi Paul,

    According to your description, you want to show the row count in a text box at the top of you report. I created a simple report in my test environment. We can using Count() function to get row count values.

    Count() function is returns a count of non_null values specified by expression, evaluated in the context of the given scope.

    You can refer to the screenshot below:
     
    Preview the report:
     
    There is an article about Count() function, you can refer to it.
    http://technet.microsoft.com/en-us/library/ms157163(v=sql.100).aspx

    Hope this help. If there are any misunderstanding, please feel free to let me know.

    Regards,
    Alisa Tang


    • Edited by Alisa TangModerator Wednesday, August 21, 2013 1:12 PM typo
    • Proposed as answer by RohitGarg Wednesday, August 21, 2013 2:01 PM
    • Marked as answer by runnerpaul Friday, August 23, 2013 10:42 AM
    Wednesday, August 21, 2013 1:07 PM
    Moderator

All replies

  • The best way is to just count rows in SQL:

    select @@ROWCOUNT as row_count from table1
    


    Ryan D

    Tuesday, August 20, 2013 3:26 PM
  • Hi,

    CountRows will give Tablix row count, but this is not available outside the tablix. But if you want to display at the top of the table, insert a header row and display or even at the footer.

    Count on the dataset will give dataset row count.

    Hope this is what you are looking for.

    Regards

    Srini

    Tuesday, August 20, 2013 5:34 PM
  • Hi Paul,

    According to your description, you want to show the row count in a text box at the top of you report. I created a simple report in my test environment. We can using Count() function to get row count values.

    Count() function is returns a count of non_null values specified by expression, evaluated in the context of the given scope.

    You can refer to the screenshot below:
     
    Preview the report:
     
    There is an article about Count() function, you can refer to it.
    http://technet.microsoft.com/en-us/library/ms157163(v=sql.100).aspx

    Hope this help. If there are any misunderstanding, please feel free to let me know.

    Regards,
    Alisa Tang


    • Edited by Alisa TangModerator Wednesday, August 21, 2013 1:12 PM typo
    • Proposed as answer by RohitGarg Wednesday, August 21, 2013 2:01 PM
    • Marked as answer by runnerpaul Friday, August 23, 2013 10:42 AM
    Wednesday, August 21, 2013 1:07 PM
    Moderator