Tuesday, 8 October 2013

Crystal Report 8.5 with SQL Temp Table(no rowset was returned for this table, query, or procedure)

We have a stored procedure (SQL Server 2005) for a crystal reports report (8.0).
Part of this stored procedure is a fetch which combines all kind of data and puts it into a temporary table.
Then a selection is made from this temp table (usually everything is selected) and this selection is the result of the SP.

The SP works fine when called in SQL Server.
However when I want to use this SP in a CR report, it won't work.
When trying to put it into the report, it gives the message: "no rowset was returned for this table, query, or procedure."

According to one of my colleagues, this is because CR doesn't like temp tables.

However, when I leave out the temp table stuff, I get the results from the fetch, which are a dozen separate results.
When I try putting this in a CR report, it only takes the first result.

Is there a way to combine the separate results from the fetch into a single recordset, without using a temp table?

SOLUTION:


SET NOCOUNT ON  for your temp table.


 


ref: http://galahtech.stinkbugonline.com/forum/index.php?topic=12967.0 

 

No comments:

Post a Comment