December 01, 2020, 09:32:48 pm
News: IF YOU ARE A MEMBER FROM THE ORIGINAL SITE AND CAN'T LOGIN. POST IN THE FEEDBACK FORUM (AS GUEST) AND AN ADMIN WILL ASSIST YOU TO ACCESS THE SITE!
Pages: [1]   Go Down
Author Topic: RESOLVED - Crystal Reports not accepting temporary table  (Read 18887 times)
Slowhand
Supporters
*

Stars: +0/-0
Offline Offline

Gender: Male
Awards:
Topic Necromancer
Posts: 4668


I code C#!


WWW
« on: February 25, 2008, 10:02:07 am »

Hi,

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?
« Last Edit: February 28, 2008, 09:33:06 am by Slowhand » Logged


wrack
Master of TMEOotAP
*

Stars: +3/-0
Offline Offline

Posts: 11116


Don't look back. Look in the mirror to look back.


WWW
« Reply #1 on: February 26, 2008, 10:17:10 pm »

Crystal Reports.........nuf said  banned2

I haven't come across the situation you have just explained but I can say this, upgrade to newer version of Crystal Reports and give it a shot. The one you are using is like 5 years old.
Logged

Slowhand
Supporters
*

Stars: +0/-0
Offline Offline

Gender: Male
Awards:
Topic Necromancer
Posts: 4668


I code C#!


WWW
« Reply #2 on: February 27, 2008, 08:09:24 am »

I doubt my boss will let me upgrade. It's for a product that we'll stop supporting in about 3 months... Sad

I discovered it's not a problem with the temp table, though.
Even with a normal table it doesn't work.

I read somewhere CR doesn't like you have multiple queries in your SP. Instead of grabbing the result of the query, it gets the result of the first query it discovers, or something.
Sounds pretty stupid to me, though...
Logged


simmo
Administrator
*

Stars: +3/-0
Offline Offline

Gender: Male
Posts: 8560



« Reply #3 on: February 27, 2008, 08:26:11 pm »

so you just want the last query, not the interim ones (that shouldn't be producing any rows to begin with), correct? Have you tried:
Code:
SET NOCOUNT ON
?
Logged

                 ..... .....

Slowhand
Supporters
*

Stars: +0/-0
Offline Offline

Gender: Male
Awards:
Topic Necromancer
Posts: 4668


I code C#!


WWW
« Reply #4 on: February 27, 2008, 08:28:22 pm »

Someone else suggested that to me this morning.. smile

And it worked yay

Thanks anyway! thumb_yello
Logged


simmo
Administrator
*

Stars: +3/-0
Offline Offline

Gender: Male
Posts: 8560



« Reply #5 on: February 27, 2008, 08:37:03 pm »

yay I got it right! I don't use crystal and have made it a point not to Another Tounge but we do use it here and I have to help on the stored procs mostly.
Logged

                 ..... .....

wrack
Master of TMEOotAP
*

Stars: +3/-0
Offline Offline

Posts: 11116


Don't look back. Look in the mirror to look back.


WWW
« Reply #6 on: February 27, 2008, 10:06:51 pm »

Yikes, never knew that would work.

BTW I am hoping that they have solved the problem of multiple queries in later versions.
Logged

simmo
Administrator
*

Stars: +3/-0
Offline Offline

Gender: Male
Posts: 8560



« Reply #7 on: February 27, 2008, 10:30:55 pm »

BTW I am hoping that they have solved the problem of multiple queries in later versions.
I think they will, but they are naming it Microsoft SQL Server: Reporting Services  happydance
Logged

                 ..... .....

wrack
Master of TMEOotAP
*

Stars: +3/-0
Offline Offline

Posts: 11116


Don't look back. Look in the mirror to look back.


WWW
« Reply #8 on: February 28, 2008, 03:53:12 am »

I haven't have a chance to work with it but is it seriously that good?
Logged

simmo
Administrator
*

Stars: +3/-0
Offline Offline

Gender: Male
Posts: 8560



« Reply #9 on: February 28, 2008, 04:07:42 pm »

I actually haven't either, but the price beats Crystal by far (if you are using MS SQL 05  laugh1 (actually I think 02 came with it as well but it wasn't that great))
Logged

                 ..... .....

wrack
Master of TMEOotAP
*

Stars: +3/-0
Offline Offline

Posts: 11116


Don't look back. Look in the mirror to look back.


WWW
« Reply #10 on: February 28, 2008, 10:09:50 pm »

Ahh.. I do have SQL 2005 smile
Logged

simmo
Administrator
*

Stars: +3/-0
Offline Offline

Gender: Male
Posts: 8560



« Reply #11 on: February 28, 2008, 10:28:16 pm »

It's supposed to be the shiznit, when I went to the SQL '05 release I think they spent as much time talking up the reporting services as much as anything else.
Logged

                 ..... .....

Pages: [1]   Go Up
Print
 
Jump to: