Row count.

6 posts, 0 answers
  1. JET
    JET avatar
    19 posts
    Member since:
    Dec 2012

    Posted 07 Oct 2015 Link to this post

    I'm trying to find the best way to get a count of rows returned from the data source? I'm trying to put this in a text box. Is there something like =DataSource.Count ?
  2. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 09 Oct 2015 Link to this post

    Hello JET,

    You can use the Count(Expression) aggregate function which returns a count of the non-null values from the data source. You need to execute the function in the correct data scope to retrieve the number of records in the data source.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. JET
    JET avatar
    19 posts
    Member since:
    Dec 2012

    Posted 09 Oct 2015 in reply to Nasko Link to this post

    I've tried this but that doesn't help with what I'm trying to do. I don't want a count of a particular field I need a count of the rows returned. Could you give me an example. I think what I'm missing is the proper expression. What expression would be used to get a count of rows returned from the data source? 

     Thanks

  5. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 14 Oct 2015 Link to this post

    Hello JET,

    In this case, you can pass a static value (e.g. string) to the Count() function and it will return the number of data records for the current data scope. Please find attached a sample report demonstrating the approach.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Raymond
    Raymond avatar
    13 posts
    Member since:
    Sep 2013

    Posted 24 Mar Link to this post

    I used ="Rows Returned: " + Count(1) to get the record count in one of my reports. I put this into a text box at the top and at the bottom of the detail section. There appears to be a bug somewhere depending on the number of rows returned. I tested this varying the number of rows returned up to 4,000 and it worked great. Both the top and bottom row showed the same number and the count was correct. Then I upped the number of rows to 5,000 and got an interesting result. The top row showed a count of 4,552 and the bottom row showed a count of only 448. The actual count should have been 5,000.

    What is happening here, and is there a fix for this or is this just too much data for the report designer to handle. I am using the Stand-Alone Report designer 9.0.15.225 from 9/1/2015.

  7. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 25 Mar Link to this post

    Hello Raymond,

    We are not aware of such behavior. In order to investigate further, please open a support ticket where you can send us a sample report with test data exhibiting the issue. Once we manage to reproduce the issue on our end we will start working on it right away.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner