Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011
    Posts
    2

    Unanswered: 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.

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •