Puneet_18


In one of my projects, i have been using the SSRS web service to render a report as pdf and then manually emailing it out.

I need to know whether the data set for the report returned any data or not (so that i can avoid emailing the report with a blank report body).

Ofcource this can be done by executing the same query (same as the query for the report) from C# code and checking the count of the resultset, before calling the SSRS Render method. But it might not be an efficient method.

Was wondering the the SSRS Web Service provides an property or method that can let me figure out whether the resultset was empty or not (after the report execution).

Thanks.




Re: How to figure out if the dataset returned any data or not while rendering the report through the SSRS Web Service

Jens K. Suessmeyer


After the report execution you will already have the rendered format, so you wonĄŻt be able to access the data properties anymore. There are two tings that came in mind as a solution:

1.Dirty solution: See how big the reports gets in size, if there is no data available for the parameter, if the rendered format has more byte than this threshold send it to the receipient.

2.Clenaer solution: Create your own data extension. http://msdn2.microsoft.com/en-us/library/aa237575(SQL.80).aspx Then you will be able to have access over the data before the report is rendered and in addition the query has to be done only one time.

HTH, Jens K. Suessmeyer.

---
http://www.sqlserver2005.de
---