TOPIC: Error: Failed To Retrieve Data From Database

Error: Failed To Retrieve Data From Database 07 Oct 2008 07:54 #301

  • observerr
  • observerr's Avatar
Hi,

I'm trying to run a simple report I create using Crystal Reports XI. It simply calls a stored procedure as follows:

CALL RPT_work.testReport("{?input1}", "{?input2}");

This returns the two inputs as two one row columns.

I managed to run reports which require no parameters (so the problem is not due to connectivity) but I'm getting the following error when I try to run reports which use parameters:

Failed To Retrieve Data From Database
Details: [Database Vendor Code: 1312])

Can you please help me solve this problem?

Note: Below please find the stored procedure I'm calling:



DELIMITER //

DROP PROCEDURE IF EXISTS RPT_work.testReport //

CREATE PROCEDURE RPT_work.testReport(IN input1 char(50), input2 char(50))
BEGIN

SET @para1 = input1;
SET @para2 = input2;

SELECT CAST(@para1 AS CHAR(10)) AS para1,
CAST(@para2 AS CHAR(10)) AS para2;

END;
//

DELIMITER ;

Attachment testReport2.zip not found

Attachments:
Last Edit: 07 Oct 2008 08:03 by observerr. Reason: Attachments weren't uploaded
The administrator has disabled public write access.

Re:Error: Failed To Retrieve Data From Database 07 Oct 2008 13:27 #303

  • bellis
  • bellis's Avatar
Hi,

I think the problem is that you have a winky face in your stored procedure :)

In any case, for some reason the zip file didn't work, could you email me the report at:

This email address is being protected from spambots. You need JavaScript enabled to view it.

Thanks!
Brian
The administrator has disabled public write access.

Re:Error: Failed To Retrieve Data From Database 07 Oct 2008 20:31 #310

  • bellis
  • bellis's Avatar
Hmm have you tried just adding the stored procedure by hand to the report instead of in a command?

In the database expert right click and choose options, make sure stored procedures is checked, browse to your database and choose the stored procedure from there.

I would test that first, I have never seen a stored procedure called from a command in a Crystal Report before.

Thanks!
Brian
The administrator has disabled public write access.