September 21, 2007 at 7:25 am
Hi,
I have a report that prints out all records in a table for that day, I'd like to add a count in my query of all rows displayed in the report. After reading online the Countrows function seemed like it would be the best way to go about this. However; I'm having trouble comprehending how the countrows function works. The MSDN site gives the following function template:
CountRows(Scope)
(String) The name of a dataset, grouping, or data region that contains the report items to which to apply the aggregate function. If Scope is specified, the aggregate function applies to all data in the dataset, grouping, or data region. For more information about the Scope parameter, see Using Report Functions in Expressions (Reporting Services).
I'm still not sure what it requires as an argument (scope) if my PK is ID and I want to do a count on ID do I use the countrows function to do that, or is there a better way to do a count of records in my report?
September 21, 2007 at 7:52 am
Ok you create datasets with the data tab of the designer, there you name the dataset, if you look at that tab you will see the drop down for your queries is labeled dataset. Use the associated name of the dataset.
September 21, 2007 at 8:04 am
Thanks Antares686,
My Dataset is called 'No_Assignment' so to get a rowcount of the dataset on the report would it look something like this?
=countrows(No_Assignment)
September 21, 2007 at 8:05 am
Ok got it,
=countrows("No_Assignment")
thank you.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply