Bala
Bala

Reputation: 1148

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

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 ?

Upvotes: 1

Views: 320

Answers (1)

stubaker
stubaker

Reputation: 1958

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.

Upvotes: 1

Related Questions