Jump to content
Fórum Script Brasil
  • 0

Erro ao adicionar Stored no Crystal Reports


JohnyMoraes

Question

Bom dia.

Quando tento adicionar uma stored ao crystal reports, me dá o seguinte erro com parâmetros:

errostored.jpg

Uploaded with ImageShack.us

a stored é a seguinte:

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;

alguém sabe como posso resolver isso ?

Utilizo o Crystal Reports 8.5 e o banco é MySql.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      651.8k
×
×
  • Create New...