Get no. of rows returned by stored procedure in SQL Server Reporting Services -
i have created report using sql server reporting services makes use of stored procedure. added stored procedure dataset report , making use of parameters filtering etc.
this works perfectly, want display no. of rows returned stored procedure @ bottom of report. in attempt added output parameter stored procedure , have statement after select
statement:
set @count = @@rowcount
this parameter appears in parameter list in visual studio , added report, value 0.
what i'm wondering how supposed catch output parameter in report, or there other way count in report?
it's not possible directly catch output parameters of stored procedures using reporting services.
the easiest way number of records in returned dataset, use expression in textbox want show count:
=countrows("stp_cityhealthresearchrequests")
if want filter count, use sum-function iif-function. example, if want count number of records concluded-column has value "yes":
=sum(iif(fields!concluded.value = "yes",1,0),"stp_cityhealthresearchrequests")
Comments
Post a Comment