Talay
Talay

Reputation: 381

Need the exact # of rows in SSRS report

I have a report that I work with in Visual Studio 2013.

The Dataset Query for the report returns about 1,000 rows of data [I run it in SSMS].

The only Row Group is the report is "Details".

Because of a 3-level grouping in the Details Group, the number of rows actually showing on the report is 400.

How can I get the actual count of Rows in the report to display?

I have tried suggestions from other threads on the forum - but I always end up with the number of rows that the Dataset returns - not the number of rows that are actually on the report.

Is there a way to get a count of the rows on the report rather than the count of rows that the underlying Dataset returns?

Thanks!!

Upvotes: 0

Views: 107

Answers (2)

Hannover Fist
Hannover Fist

Reputation: 10860

Use CountRows.

Returns a count of rows within the specified scope.

=CountRows("DataSet1")

Upvotes: 0

EPWebS25
EPWebS25

Reputation: 11

Add row count to your sql and have the ssrs pick up your max row_number value.

I run SQL developer for most of my testing before I drop it into SSRS. It' not Visual Studio but how I would do it may help you.

Select row_count() over (order by [unique value in row]) ROW_NBR, existing row information from tables where ...

Then in SSRS enter this in your cell

=MAX(ROW_NBR, "DataSet1")

OR!!!!

just use this

=Count([value in existing code], "DataSet1")

Widening the scope of the count to your entire dataset will give you a count of all values in the dataset

Upvotes: 0

Related Questions