When generating the query for the dates in SQL
the result is correct, but when I put it in separate queries, when I want to see it in XtraReport
only shows me the first one, my question is how could I solve this problem ? either from the query or XtraReport
.
CREATE PROCEDURE [dbo].[AsistenciaDeMaestros]
(@datFechaInicial DATE,
@datFechaFinal DATE
)
AS
BEGIN
SET NOCOUNT ON;
WHILE(@datFechaInicial<=@datFechaFinal)
BEGIN
IF ((DATEPART(dw,@datFechaInicial)=1) OR(DATEPART(dw,@datFechaInicial)=2)OR (DATEPART(dw,@datFechaInicial)=3)OR
(DATEPART(dw,@datFechaInicial)=4)OR(DATEPART(dw,@datFechaInicial)=5))
BEGIN
SELECT strDia=(DATENAME(dw, @datFechaInicial)),strFecha=(@datFechaInicial)
END
SET @datFechaInicial=DATEADD(day, 1, @datFechaInicial)
END
END