Show less data on the Report but while Exporting the data in excel , export more data

328 Views Asked by At

I need to show only 5 rows of data on the SSRS reports , but when the user exports the data he must be able to export all the data that dataset is holding. Is there anyway to achieve this ?

1

There are 1 best solutions below

0
On BEST ANSWER

In Group Properties > Visibility, select Show or hide based on an expression and set the expression to:

=IIF(RowNumber("DatasetName") > 5 AND Globals!RenderFormat.IsInteractive, True, False)

RenderFormat.IsInteractive returns true for report viewer preview or HTML view, so you should only see 5 rows in these views while seeing all rows when exporting to another format. You could also optionally substitute in Globals!RenderFormat.Name = "EXCEL" if you want to target a specific export format.