If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > Problem to connect Stored Procedure with Crystal

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-06-11, 10:22
JohnyMoraes JohnyMoraes is offline
Registered User
 
Join Date: Apr 2011
Posts: 2
Problem to connect Stored Procedure with Crystal

Good Morning.

When i try to add one Stored Procedure in Crystal Reports, show me the error about parameters:

"Incorrect number of arguments for PROCEDURE sp_ChequesDevolvidos; expected 2; got 0;"

http://i51.tinypic.com/zmz8cm.jpg

the stored is:

Code:
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_ChequesDevolvidos`(vDataInicio date, vDataFim date)
BEGIN
       *
       *SELECT SEMANA_CADASTRADOS, 
              *  QTD_CADASTRADOS, 
              *  SOMA_CADASTRADOS,
              *  SEMANA_DEVOLVIDOS,
              *  QTD_DEVOLVIDOS,
              *  SOMA_DEVOLVIDOS 
       *FROM
          (
          SELECT WEEK(CHEQUE_DTCADASTRO) as 'SEMANA_CADASTRADOS', 
                  COUNT(*) as 'QTD_CADASTRADOS', 
                  SUM(CHEQUE_VALOR) as 'SOMA_CADASTRADOS'
          FROM cheques
          WHERE CHEQUE_DTCADASTRO BETWEEN vDataInicio AND vDataFim
          GROUP BY WEEK(CHEQUE_DTCADASTRO)
          )c left join 
          (
          SELECT WEEK(CHEQUE_DTDEVOLUCAO) as 'SEMANA_DEVOLVIDOS', 
                  COUNT(*) as 'QTD_DEVOLVIDOS',
                  SUM(CHEQUE_VALOR) as 'SOMA_DEVOLVIDOS'
          FROM cheques
          WHERE CHEQUE_DTDEVOLUCAO BETWEEN vDataInicio AND vDataFim
          GROUP BY WEEK(CHEQUE_DTDEVOLUCAO)
          )a
          on c.SEMANA_CADASTRADOS = a.SEMANA_DEVOLVIDOS;          
END;

Someone know how i find a solution for this ?
I use Crystal Reports 8.5 and MySql.
Reply With Quote
  #2 (permalink)  
Old 04-06-11, 15:18
JohnyMoraes JohnyMoraes is offline
Registered User
 
Join Date: Apr 2011
Posts: 2
I solve this problem!
I instal the driver Mysql odbc 5.1.8 and fixed the problem.
If someone need, the driver is in :MySQL :: Download Connector/ODBC
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On