locked
reportviewer: How to have record count show on report RRS feed

  • Question

  • User-1514795968 posted

    VS2010 VB.NET reportviewer / reportdesigner

    Hi all,

    At the end of my report I want something like this:

    Total Records: 37

    How is this done in the report designer?

    thx

    Wednesday, February 16, 2011 12:20 PM

Answers

  • User-60558687 posted

    I believe you can use the COUNT function.

    Assuming your data set name is DataSet1 for example, the COUNT(field_name,"DataSet1"). Check the docs on the COUNT function for correct usage.

    The Expression needs to go inside a label which is inside a control tied to a data set.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 16, 2011 5:46 PM
  • User-830595639 posted

    Hi

    You can take a Textbox and in the expression you can write the following expression to get the desired result.

    Count(Fields!AnyFieldNameInDataSet1.Value, "DataSet1")

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 17, 2011 1:07 AM
  • User-624088818 posted

    You can use =CountRows("datasetName") to get the total rows from dataset and assign this expr to the textbox in the report.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 18, 2011 4:54 AM

All replies

  • User-60558687 posted

    I believe you can use the COUNT function.

    Assuming your data set name is DataSet1 for example, the COUNT(field_name,"DataSet1"). Check the docs on the COUNT function for correct usage.

    The Expression needs to go inside a label which is inside a control tied to a data set.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 16, 2011 5:46 PM
  • User-830595639 posted

    Hi

    You can take a Textbox and in the expression you can write the following expression to get the desired result.

    Count(Fields!AnyFieldNameInDataSet1.Value, "DataSet1")

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 17, 2011 1:07 AM
  • User-624088818 posted

    You can use =CountRows("datasetName") to get the total rows from dataset and assign this expr to the textbox in the report.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 18, 2011 4:54 AM