diff --git a/ReportesSIGPC/Query/SPGetionDesgloce.sql b/ReportesSIGPC/Query/SPGetionDesgloce.sql new file mode 100644 index 000000000..a3d132995 --- /dev/null +++ b/ReportesSIGPC/Query/SPGetionDesgloce.sql @@ -0,0 +1,85 @@ +-- ================================================ +-- Template generated from Template Explorer using: +-- Create Procedure (New Menu).SQL +-- +-- Use the Specify Values for Template Parameters +-- command (Ctrl-Shift-M) to fill in the parameter +-- values below. +-- +-- This block of comments will not be included in +-- the definition of the procedure. +-- ================================================ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +-- ============================================= +-- Author: +-- Create date: +-- Description: +-- ============================================= +CREATE PROCEDURE SP_DESGLOCE_GESTIONES +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + +CREATE TABLE #TablaTemporal ( + [Total en SIGDD] [int] NOT NULL, + [Cancelada] [int] NOT NULL, + [Bloqueada] [int] NOT NULL, + [Ingresadas en SIGDD] [int] NOT NULL, + [Finalizada] [int] NOT NULL, + [Pendiente] [int] NOT NULL, + --[% de atencion] [int] NOT NULL, + --[% pendientes de resolver] [int] NOT NULL, + [Fecha] [varchar](100) NOT NULL + --[Aņo] [int] NOT NULL, +) + +INSERT INTO #TablaTemporal ( + [Total en SIGDD] , + [Cancelada] , + [Bloqueada] , + [Ingresadas en SIGDD] , + [Finalizada] , + [Pendiente] , + --[% de atencion] , + --[% pendientes de resolver] , + --[Mes] , + [Fecha] +) SELECT +[CANCELADADESGLOCEGESTIONES] +[BLOQUEADADESGLOCEGESTIONES] + [FINALIZADADESGLOCEGESTIONES]+[PENDIENTEDESGLOCEGESTIONES] + ,[CANCELADADESGLOCEGESTIONES] + ,[BLOQUEADADESGLOCEGESTIONES] + , [FINALIZADADESGLOCEGESTIONES]+[PENDIENTEDESGLOCEGESTIONES] + ,[FINALIZADADESGLOCEGESTIONES] + ,[PENDIENTEDESGLOCEGESTIONES] + , FORMAT(CAST('01/'+CONVERT(varchar,[MESDESGLOCEGESTIONES] )+'/'+CONVERT(varchar,[ANNODESGLOCEGESTIONES]) as date) , 'MMM yyyy') +FROM +[SIGPC].[dbo].[t_rpt_desglocegestiones] + + + +SELECT * FROM #TablaTemporal +UNPIVOT ([Value] FOR Estado IN ( + [Total en SIGDD] , + [Cancelada] , + [Bloqueada] , + [Ingresadas en SIGDD] , + [Finalizada] , + [Pendiente] + + +)) Unp + pivot( + max([Value]) + for [Fecha] IN ([ene. 2020],[feb. 2020],[mar. 2020],[abr. 2020],[may. 2020],[jun. 2020],[jul. 2020],[ago. 2020],[sep. 2020],[oct. 2020],[nov. 2020],[ dic. 2020]) + ) Piv + + + + +END +GO diff --git a/ReportesSIGPC/ReportesSIGPC/rpt_desglocegestiones.rdl b/ReportesSIGPC/ReportesSIGPC/rpt_desglocegestiones.rdl index a6a25fa42..d01473c1b 100644 --- a/ReportesSIGPC/ReportesSIGPC/rpt_desglocegestiones.rdl +++ b/ReportesSIGPC/ReportesSIGPC/rpt_desglocegestiones.rdl @@ -14,6 +14,36 @@ 2.5cm + + 2.5cm + + + 2.5cm + + + 2.5cm + + + 2.5cm + + + 2.5cm + + + 2.5cm + + + 2.5cm + + + 2.5cm + + + 2.5cm + + + 2.5cm + @@ -28,7 +58,7 @@ - + Estado + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + abr 2020 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + may 2020 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + jun 2020 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + jul 2020 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + ago 2020 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + sep 2020 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + oct 2020 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + nov 2020 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + ID dic 2020 + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -116,21 +446,21 @@ - + true true - + =Fields!Estado.Value + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!mar__2020.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!abr__2020.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!may__2020.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!jun__2020.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!jul__2020.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ago__2020.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!sep__2020.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!oct__2020.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!nov__2020.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ID_dic__2020.Value + @@ -240,7 +880,7 @@ 2in