Good Morning.
When i try to add one Stored Procedure in Crystal Reports, show me the error about parameters:
the stored is:
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.