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.
Unfortunately, activation email could not send to your email. Please try again.

How to get the number of rows in a Tablix

Thread ID:

Created:

Updated:

Platform:

Replies:

115332 Jan 10,2014 02:36 AM Jan 14,2014 03:02 AM WPF 3
loading
Tags: ReportDesigner
Wang Jianwei
Asked On January 10, 2014 02:36 AM

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


Anandakumar S [Syncfusion]
Replied On January 10, 2014 10:43 AM

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


Wang Jianwei
Replied On January 13, 2014 04:33 AM

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


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

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


CONFIRMATION

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.

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.

;