Wednesday, March 7, 2012

How to get number of records returned by a data set?

Hi,
I am looking for a way to determine a number of records returned by my
dataset. The ultimate goal is to hide a table and dispaly informative
message, in case there are no records returned. This should be fairly
simple, but I can't seem to figure out how to get it. Thank you in advance!
MichaelYou can get it using the Count function. The sintaxis is:
=Count(Fields!some_field.Value, "Your_dataset")
You can use this to display the number of rows of a data set in a textbox.
You can also use it as a condition inside an IFF clause:
=IIF(Count(Fields!some_field.Value, "Your_dataset") = 0, action1, action2)
I hope this helps|||Works like a charm! Thank you very much!
- Michael

No comments:

Post a Comment