无法在Crystal Reports 2008中使用存储过程 [英] Can't use stored procedures in Crystal Reports 2008
问题描述
我有
Windows XP Professional
Crystal Reports 2008
MySQL 5.6(Windows)
mySQLODBC 5.2
尝试连接存储过程并收到错误;
数据库连接器错误HY000:[MySQL] [ODBC 5.1驱动程序] [mysql-5.0.51a community-nt-log] PROCEDURE mobile_active_dw.test的参数数量不正确;预期为1,得到0; [数据库供应商代码1318]
数据库连接器错误'42S02。[MySQL] [ODBC 5.2驱动程序] [mysqld-5.6.11] Table'modeevaluador.test'不存在。 />
存储过程
CREATE DEFINER =`root` @`%`PROCEDURE`test`(>
testparam int
)
SELECT *
FROM resulttemplate
此查询返回多个数据类型(int,string,datetime)。
当数据类型为INT时,Crystal会抛出此错误,但当数据类型不是INT时,连接正常。
I have
Windows XP Professional
Crystal Reports 2008
MySQL 5.6 (Windows)
mySQLODBC 5.2
Try and connect to the stored procedure and you get the error;
Database connector error HY000:[MySQL][ODBC 5.1 Driver][mysql-5.0.51a community-nt-log]incorrect nummber of arguments for PROCEDURE mobile_active_dw.test;expected 1, got 0;[Database Vendor Code 1318]
Database connector error '42S02.[MySQL][ODBC 5.2 Driver][mysqld-5.6.11]Table'modeevaluador.test' doesn't exist.
Stored Procedure
CREATE DEFINER=`root`@`%` PROCEDURE `test`(
testparam int
)
SELECT *
FROM resulttemplate
This query returns several Data Types(int, string, datetime).
When the data type is INT Crystal throw this error but when the data type isn't INT the connection is ok.
推荐答案
如何将参数从crystalreport传递到storedprocedure? [ ^ ]
设置存储过程时,请确保输入所有参数默认值。不要将任何参数留空或为空。这可能会导致在报告上设置存储过程时出现问题。然后当你运行报告时,你可以传递你想要的任何参数。
谢谢
When you set up the Stored Procedure make sure you are entering all the parameter defaults. Dont leave any parameter empty or null. This may cause a problem in setting up the Stored Procedure on the report. Then when you run the report, you can pass any parameters you want.
Thanks
这篇关于无法在Crystal Reports 2008中使用存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!