How to get an accurate count of displayed records

1 Answer 234 Views
Report Designer - Web Report Parameters
Randy
Top achievements
Rank 1
Randy asked on 25 Sep 2023, 03:38 PM

I have a report that I am trying to get the number of rows displayed.

 

Which displays:

 

I have also tried = Count(Fields.[Inspector Name])

It should only show the 4 for each visible row. What have I done wrong?

 

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Todor
Telerik team
answered on 28 Sep 2023, 08:38 AM

Hello Randy,

Generally, the aggregate functions work in the scope of the report item they are used in. For the TextBox, this is determined by the nearest parent data item or group. You may use the Exec data function to count in a specific parent scope.

Note that the first expression is not valid. You may use 'is Not Null' instead of '<> NULL'. It will still count all the occurrences of the field although the inner expression will return either True or False.

The second expression '= Count(Fields.[Inspector Name])' is valid and returns the count of the records in the corresponding scope. I suspect that you use grouping and/or filtering, hence the item number is more than the displayed rows.

If you hide some of the rows with Bindings or Conditional Formatting, you may try using the same expression with the Count function to filter out the non-visible items.

Feel free also to send us a runnable report for local investigation. I hope we will be able to provide a proper solution for the requirement.

Regards,
Todor
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Randy
Top achievements
Rank 1
commented on 28 Sep 2023, 11:45 AM

Thanks for taking a look. I have attached my report.
Randy
Top achievements
Rank 1
commented on 29 Sep 2023, 07:36 PM

I added all filters as parameters (The Report did not pass in a Start date and End date) but now it does. Thanks for pointing me in the right direction.
Tags
Report Designer - Web Report Parameters
Asked by
Randy
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or