Problem with stored procedure that calls other stored procedures

Problem with stored procedure that calls other stored procedures

Post by Geoff Penningto » Sat, 06 Jun 1998 04:00:00



I wrote a stored procedure that creates a temporary table and then calls a
series of other stored procedures to insert rows into the table.  Finally
it selects all columns from the temp table.  I tested it in InterDev and
everything was fine.

The problem came when I fired up Crystal Reports and tried to create a
report based on the stored proc.  I get an error message:  "Error opening
file.  There are no fields in the file: proc_mfpri_report" .
(proc_mfpri_report is my stored proc).  When I replace the calls to other
procs with inline code it works fine, but I hate not being able to
modularize my code.  I have tested using a "permanent" table instead of a
temporary one, but it makes no difference.

Has anyone seen something like this?

Much obliged,
Geoff Pennington

 
 
 

Problem with stored procedure that calls other stored procedures

Post by Kalen Delane » Tue, 09 Jun 1998 04:00:00


Is it possible that Crystal Reports is logging in as another user than the
one the procs are owned by? Are the proc and table names being totally
qualified?

--
Kalen Delaney
MCSE, SQL Server MCT, MVP


>I wrote a stored procedure that creates a temporary table and then calls a
>series of other stored procedures to insert rows into the table.  Finally
>it selects all columns from the temp table.  I tested it in InterDev and
>everything was fine.

>The problem came when I fired up Crystal Reports and tried to create a
>report based on the stored proc.  I get an error message:  "Error opening
>file.  There are no fields in the file: proc_mfpri_report" .
>(proc_mfpri_report is my stored proc).  When I replace the calls to other
>procs with inline code it works fine, but I hate not being able to
>modularize my code.  I have tested using a "permanent" table instead of a
>temporary one, but it makes no difference.

>Has anyone seen something like this?

>Much obliged,
>Geoff Pennington