We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get the number of rows in a Tablix

Thread ID:





115332 Jan 10,2014 07:36 AM UTC Jan 14,2014 08:02 AM UTC WPF 3
Tags: ReportDesigner
Wang Jianwei
Asked On January 10, 2014 07:36 AM UTC

Hi Syncfusion team,

My report has a table which is showing some data from a dataset.

And I have another text box which I want to show the number of total rows in that table.

What expression should I put for the text box to retrieve the number of rows?

Thank you.





Anandakumar S [Syncfusion]
Replied On January 10, 2014 03:43 PM UTC

Hi Jianwei,

Thanks for using Syncfusion Products.

You can display the number rows using RowNumbers / CountRows in Expression. We have prepared a report sample based on this and that can be download from the following location.

Report sample: http://www.syncfusion.com/downloads/support/directtrac/general/RowCounts-143051483.zip

Please let us know if you have any questions.


Anandakumar S

Wang Jianwei
Replied On January 13, 2014 09:33 AM UTC

Hi Anandakumar,

Very helpful answer, Thank you.

I am trying to extend your solution to hide/show the table based on the number of rows in that table.

If there is no rows in the table, I would like to hide its row headers.

So I select the whole table, go to Tablix Properties ->Visibility -> Show or hide based on an expression, and input "=IIf(CountRows()=0, False, True)".

However, the table would be hidden even if it has data in it, so clearly something is wrong with this approach.

Do you have any suggestion of what is the correct way to achieve it?



Soundara Rajan S [Syncfusion]
Replied On January 14, 2014 08:02 AM UTC

Hi Jianwei,


Thanks for your patience.


We have prepared sample rdl file based on your requirement. Please find the rdl from following location :


Rdl : RowCounts.zip


We have achieved your scenario  as shown in below Expression,


=IIf(RowNumber("GetProducts")=0, true, false)


Please let us know, if you have any queries.



Soundara Rajan S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon