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. Image for the cookie policy date
Starting in 2019, the Reporting control is no longer included in Essential Studio®. If you're experiencing issues with the Syncfusion� Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion� and appreciate your understanding.

How to get the number of rows in a Tablix

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.

 

Regards,

 

Jianwei


3 Replies

AS Anandakumar S Syncfusion Team 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.

Regards,

Anandakumar S



WJ Wang Jianwei 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?

Cheers.

Jianwei



SR Soundara Rajan S Syncfusion Team 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.

 

Regards,

Soundara Rajan S


Loader.
Up arrow icon