RDLC / RDL report - How to determine last row in Tablix/Table

we need to use Count() and RowNumber() functions to check the last row

Count() function returns total number of given dataset. 

RowNumber() function returns current row number

Finally, 

= iif (COUNT(Fields!EntityID.Value,"DatasetName") = RowNumber("DatasetName"), "Solid","Default")

Click the cell in the table row and select the bottom expression





Bottom expression

Result: first column is showing bottom line with each cell but second column is only showing column with the last cell.














Comments

Asif Iqbal said…
Hi Faraz,

The article was nice. However, is there any way to dtermine the last row in a page, rather than the last row in the entire result?

Thanks in advance,
Asif
Ali Faraz said…
Hi, I think its not straight forward to know the last row of the page but you can use different workaround like custom paging. Display 10/20/25 rows per page so you will know which is the last row.
Asif Iqbal said…
Thanks for the reply. Actually my problem is that I want to force a border on the table at the end of each page, even if that is not the end of the group. I don't want to show borders on each row, only at the end of a group. However, when a groupspans multiple pages, the bottom of the table in the first page remains open, which looks ugly. That's why I was trying to locate the last row on a page and set an expression for the bottom border or something like that. Do you have any idea for that ?
Ali Faraz said…
I have not come across anything like this before. I can recommend you one thing (I can't check it at the moment as I am extremely busy). I remember that we can give subtotals at the end of each page. Check that how can we give subtotal at the end of each page. And what you can do is show the subtotal line with empty values and give border style to that subtotal line.
Ali Faraz said…
Right. drop a tablix. right click on the Textbox and then 'Add total' > below. reduce the height of the row. give top border. i hope it will be helpful.
Asif Iqbal said…
Thanks Faraz, that worked like a charm !!
Ali Faraz said…
Brilliant. I am glad it worked.

Popular posts from this blog

GOOGLE privacy policy New Rule 1 March 2012 (How to turn the settings off to stop sharing your personal information)

Specializing Your Skills: Postgraduate Studies to Enhance Career Prospects