diff --git a/AYA.SlnSynor/AYA.SlnSynor/Controllers/ReportesController.cs b/AYA.SlnSynor/AYA.SlnSynor/Controllers/ReportesController.cs
index d87af138a..87a588fca 100644
--- a/AYA.SlnSynor/AYA.SlnSynor/Controllers/ReportesController.cs
+++ b/AYA.SlnSynor/AYA.SlnSynor/Controllers/ReportesController.cs
@@ -17,8 +17,9 @@ namespace AYA.SlnSinort.Controllers.Reportes
public class ReportesController : BaseController
{
-
-
+
+ DateTime fechainicio = Convert.ToDateTime("1900-01-01");
+ DateTime fechafin = DateTime.Today;
#region Controllers
@@ -27,23 +28,46 @@ namespace AYA.SlnSinort.Controllers.Reportes
{
return View();
}
- public ActionResult FichaTecnica(int? emisor, int? documentotecnico, int? aplicacion, int? contenido, int? subcontenido, int? grupotematico, int? subgrupotematico, string versionvigente, string fechainicio, string fechafin)
+ public ActionResult FichaTecnica()
{
InitControllers();
+
+ //DataTable1TableAdapter dtta = new DataTable1TableAdapter();
+ //dtsFichaTecnicaFinal dts = new dtsFichaTecnicaFinal();
+ //ReportViewer reportViewer = new ReportViewer();
+
- if (emisor == null)
- {
- CargarReporte();
- }
- else
- {
- CargarReporteParemetros(emisor, documentotecnico, aplicacion, contenido, subcontenido, grupotematico, subgrupotematico, versionvigente, fechainicio, fechafin);
- }
- return PartialView("FichaTecnica");
+ // reportViewer.ProcessingMode = ProcessingMode.Local;
+ // reportViewer.SizeToReportContent = true;
+ // reportViewer.Width = Unit.Percentage(90);
+ // reportViewer.Height = Unit.Percentage(100);
+ // //DateTime fechainicio = Convert.ToDateTime("1900-01-01");
+ // //DateTime fechafin = DateTime.Today;
+ // //fechafin = fechafin.AddYears(20);
+ // dtta.Fill(dts.DataTable1, null, null, null, null, null, null, null, null, Convert.ToDateTime("1900-01-01"), DateTime.Today.AddYears(20));
+ // reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Reportes\rdlc\repFichaTecnica.rdlc";
+ // //reportViewer.LocalReport.ReportPath = @"\\10.50.1.97\Aplicaciones\SINORT(6075)\Raiz\DocumentosSinort\repFichaTecnica.rdlc";
+ // //reportViewer.LocalReport.ReportPath = @"D:\Aplicaciones\SINORT\Raiz\DocumentosSinort\repFichaTecnica.rdlc";
+ // reportViewer.LocalReport.DataSources.Clear();
+ // reportViewer.LocalReport.DataSources.Add(new ReportDataSource("dtsFichaTecnicaFinal", dts.Tables["Datatable1"]));
+
+
+ // reportViewer.LocalReport.Refresh();
+
+ // ViewBag.ReportViewer = reportViewer;
+
+ ////else
+ ////{
+ //// CargarReporteParemetros(emisor, documentotecnico, aplicacion, contenido, subcontenido, grupotematico, subgrupotematico, versionvigente, fechainicio, fechafin,usuario,nombreusuario);
+ ////}
+
+ //return PartialView("~/Views/Reportes/FichaTecnica.cshtml", reportViewer);
+ //return View("FichaTecnica", reportViewer);
+ return View();
}
@@ -52,23 +76,61 @@ namespace AYA.SlnSinort.Controllers.Reportes
InitControllers();
return View();
}
+ public ActionResult ReporteFichaTecnica()
+ {
+ //DataTable1TableAdapter dtta = new DataTable1TableAdapter();
+ //dtsFichaTecnicaFinal dts = new dtsFichaTecnicaFinal();
+ //ReportViewer reportViewer = new ReportViewer();
+
+
+
+
+
+ //reportViewer.ProcessingMode = ProcessingMode.Local;
+ //reportViewer.SizeToReportContent = true;
+ //reportViewer.Width = Unit.Percentage(90);
+ //reportViewer.Height = Unit.Percentage(100);
+ ////DateTime fechainicio = Convert.ToDateTime("1900-01-01");
+ ////DateTime fechafin = DateTime.Today;
+ ////fechafin = fechafin.AddYears(20);
+ //dtta.Fill(dts.DataTable1, null, null, null, null, null, null, null, null, Convert.ToDateTime("1900-01-01"), DateTime.Today.AddYears(20));
+
+ //reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Reportes\rdlc\repFichaTecnica.rdlc";
+ ////reportViewer.LocalReport.ReportPath = @"\\10.50.1.97\Aplicaciones\SINORT(6075)\Raiz\DocumentosSinort\repFichaTecnica.rdlc";
+ ////reportViewer.LocalReport.ReportPath = @"D:\Aplicaciones\SINORT\Raiz\DocumentosSinort\repFichaTecnica.rdlc";
+ //reportViewer.LocalReport.DataSources.Clear();
+ //reportViewer.LocalReport.DataSources.Add(new ReportDataSource("dtsFichaTecnicaFinal", dts.Tables["Datatable1"]));
+
+
+ //reportViewer.LocalReport.Refresh();
+
+ //ViewBag.ReportViewer = reportViewer;
+
+ ////else
+ ////{
+ //// CargarReporteParemetros(emisor, documentotecnico, aplicacion, contenido, subcontenido, grupotematico, subgrupotematico, versionvigente, fechainicio, fechafin,usuario,nombreusuario);
+ ////}
+
+ //return PartialView("~/Views/Reportes/ReporteFichaTecnica.cshtml", reportViewer);
+ return View();
+ }
#endregion
#region Configuracion y Parametrizacion
[AllowAnonymous]
[HttpPost]
- public ActionResult CargarReporteParemetros(int? emisor, int? documentotecnico, int? aplicacion, int? contenido, int? subcontenido, int? grupotematico, int? subgrupotematico, string versionvigente, string fechainicio, string fechafin)
+ public ActionResult CargarReporteParemetros(int? emisor, int? documentotecnico, int? aplicacion, int? contenido,
+ int? subcontenido, int? grupotematico, int? subgrupotematico, string versionvigente, string fechainicio, string fechafin,string usuario,string nombreusuario)
{
+ Session["UserName"] = usuario;
+ Session["FullName"] = nombreusuario;
InitControllers();
-
- try
- {
-
-
DataTable1TableAdapter dtta = new DataTable1TableAdapter();
dtsFichaTecnicaFinal dts = new dtsFichaTecnicaFinal();
ReportViewer reportViewer = new ReportViewer();
+ try
+ {
reportViewer.ProcessingMode = ProcessingMode.Local;
reportViewer.SizeToReportContent = true;
@@ -94,17 +156,21 @@ namespace AYA.SlnSinort.Controllers.Reportes
ViewBag.ReportViewer = reportViewer;
+
}
catch (Exception ex)
{
- Response.Write(ex.Message.ToString());
+ return Json(ex.Message.ToString(), JsonRequestBehavior.AllowGet);
+
}
- return PartialView("FichaTecnica");
+
+ return PartialView("~/Views/Reportes/FichaTecnica.cshtml", reportViewer);
+
}
[AllowAnonymous]
[HttpPost]
- public void CargarReporte( )
+ public ActionResult CargarReporte( )
{
DataTable1TableAdapter dtta = new DataTable1TableAdapter();
dtsFichaTecnicaFinal dts = new dtsFichaTecnicaFinal();
@@ -130,6 +196,7 @@ namespace AYA.SlnSinort.Controllers.Reportes
ViewBag.ReportViewer = reportViewer;
+ return PartialView("~/Views/Reportes/FichaTecnica.cshtml", reportViewer);
}
diff --git a/AYA.SlnSynor/AYA.SlnSynor/ReporteFT.aspx b/AYA.SlnSynor/AYA.SlnSynor/ReporteFT.aspx
new file mode 100644
index 000000000..c8d17e8c9
--- /dev/null
+++ b/AYA.SlnSynor/AYA.SlnSynor/ReporteFT.aspx
@@ -0,0 +1,255 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReporteFT.aspx.cs" Inherits="AYA.SlnSinort.ReporteASP.ReporteFT" %>
+
+<%@ Register assembly="Microsoft.ReportViewer.WebForms" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
+
+
+
+
+
+
+ Prueba
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AYA.SlnSynor/AYA.SlnSynor/ReporteFT.aspx.cs b/AYA.SlnSynor/AYA.SlnSynor/ReporteFT.aspx.cs
new file mode 100644
index 000000000..ba1f5173c
--- /dev/null
+++ b/AYA.SlnSynor/AYA.SlnSynor/ReporteFT.aspx.cs
@@ -0,0 +1,63 @@
+using AYA.SlnSinort.Reportes.datasets;
+using AYA.SlnSinort.Reportes.datasets.dtsFichaTecnicaFinalTableAdapters;
+using Microsoft.Reporting.WebForms;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+
+namespace AYA.SlnSinort.ReporteASP
+{
+ public partial class ReporteFT : System.Web.UI.Page
+ {
+
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ if (!IsPostBack)
+ {
+
+ DataTable1TableAdapter dtta = new DataTable1TableAdapter();
+ dtsFichaTecnicaFinal dts = new dtsFichaTecnicaFinal();
+ ReportViewer reportViewer = new ReportViewer();
+
+
+ ReportViewer1.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Reportes\rdlc\repFichaTecnica.rdlc";
+ dtta.Fill(dts.DataTable1, null, null, null, null, null, null, null, null, Convert.ToDateTime("1900-01-01"), DateTime.Today.AddYears(20));
+
+ ReportViewer1.LocalReport.DataSources.Clear();
+ ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dtsFichaTecnicaFinal", dts.Tables["Datatable1"]));
+
+
+ ReportViewer1.LocalReport.Refresh();
+
+
+
+
+ }
+ }
+
+ protected void Button1_Click(object sender, EventArgs e)
+ {
+ DataTable1TableAdapter dtta = new DataTable1TableAdapter();
+ dtsFichaTecnicaFinal dts = new dtsFichaTecnicaFinal();
+ ReportViewer reportViewer = new ReportViewer();
+
+
+ ReportViewer1.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Reportes\rdlc\repFichaTecnica.rdlc";
+ dtta.Fill(dts.DataTable1, null,3, null, null, null, null, null, null, Convert.ToDateTime("1900-01-01"), DateTime.Today.AddYears(20));
+
+ ReportViewer1.LocalReport.DataSources.Clear();
+ ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dtsFichaTecnicaFinal", dts.Tables["Datatable1"]));
+
+
+ ReportViewer1.LocalReport.Refresh();
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/AYA.SlnSynor/AYA.SlnSynor/ReporteFT.aspx.designer.cs b/AYA.SlnSynor/AYA.SlnSynor/ReporteFT.aspx.designer.cs
new file mode 100644
index 000000000..85e7473df
--- /dev/null
+++ b/AYA.SlnSynor/AYA.SlnSynor/ReporteFT.aspx.designer.cs
@@ -0,0 +1,51 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace AYA.SlnSinort.ReporteASP {
+
+
+ public partial class ReporteFT {
+
+ ///
+ /// form1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// ScriptManager1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.ScriptManager ScriptManager1;
+
+ ///
+ /// Button1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button Button1;
+
+ ///
+ /// ReportViewer1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::Microsoft.Reporting.WebForms.ReportViewer ReportViewer1;
+ }
+}
diff --git a/AYA.SlnSynor/AYA.SlnSynor/Scripts/_references.js b/AYA.SlnSynor/AYA.SlnSynor/Scripts/_references.js
index 2f8fb6d9d..bd862c292 100644
Binary files a/AYA.SlnSynor/AYA.SlnSynor/Scripts/_references.js and b/AYA.SlnSynor/AYA.SlnSynor/Scripts/_references.js differ
diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/EstadisticaReporte/FichaTecnica.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/EstadisticaReporte/FichaTecnica.js
index 3cd8e7857..de1ba6681 100644
--- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/EstadisticaReporte/FichaTecnica.js
+++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/EstadisticaReporte/FichaTecnica.js
@@ -1,7 +1,7 @@
var model = {};
jQuery(document).ready(function () {
-
+
getDataModel();
});
@@ -12,7 +12,7 @@ this.getDataModel = function () {
CargarContenido();
CargarGrupoTematico();
CargarDocumentoTecnico();
-
+
$("#txtFechaInicio").datepicker();
$("#txtFechaFinal").datepicker();
@@ -210,19 +210,65 @@ this.LeerFormulario = function (){
subgrupotematico: $('#hiddenSubCategoriaGrupoTematico').val(),
versionvigente: $('#txtVersionVigente').val(),
fechainicio:$("#txtFechaInicio").DateFormatWCF(),
- fechafin: $("#txtFechaFinal").DateFormatWCF()
+ fechafin: $("#txtFechaFinal").DateFormatWCF(),
+ usuario: UsuarioSistema,
+ nombreusuario: NombreUsuario
+
}
model = reporte;
}
-this.BuscarReporte = function (){
- var uri = server + 'Reportes/CargarReporteParemetros';
- LeerFormulario();
+this.Reset = function () {
+
+}
+this.BuscarReporte = function () {
+
+
+
+
+
+ //var uri = server + 'Reportes/CargarReporteParemetros';
+ //LeerFormulario();
+
+
+
+ //var container = document.getElementById('rptFichaTecnica');
+ //var refreshContent = container.innerHTML;
+ //$.ajax({
+ // type: "POST",
+ // url: uri,
+ // data: JSON.stringify(model),
+ // contentType: "application/json; charset=utf-8",
+ // dataType: "json",
+ // success: function (result) {
+
+ // var a = data;
+ // //container.innerHTML = refreshContent;
+ // $("#rptFichaTecnica").html = result;
+ // ENDREQUEST();
+ // },
+ // error: function (result) {
+ // //var container2 = document.getElementById('rptFichaTecnica');
+ // //var refreshContent2 = container2.innerHTML;
+ // //container.innerHTML = refreshContent2;
+ // container.innerHTML = refreshContent;
+ // //container.innerHTML = $("#rptFichaTecnica").html(result);
+ // //ej.widget.init($("#rptFichaTecnica"));
+ // //$("#rptFichaTecnica").html = result.responseText;
+ // ENDREQUEST();
+ // }
+
+
+ //});
+}
+
+this.CargarReporte = function () {
+ var uri = server + 'Reportes/CargarReporte';
+
- var container = document.getElementById('rptFichaTecnica');
- var refreshContent = container.innerHTML;
+ //AjaxPostData(uri, model, false, false, prueba, null, null);
$.ajax({
type: "POST",
url: uri,
@@ -231,20 +277,22 @@ this.BuscarReporte = function (){
dataType: "json",
success: function () {
- container.innerHTML = refreshContent;
+
ENDREQUEST();
},
- error: function () {
-
- container.innerHTML = refreshContent;
-
+ error: function (data) {
+ //var a = '@ViewBag.ReportViewer';
+ //s@
+
ENDREQUEST();
}
-
+
});
}
-
+this.prueba = function (data) {
+ var a = data;
+}
this.RefrescarReporte = function () {
var container = document.getElementById('rptFichaTecnica');
var refreshContent = container.innerHTML;
diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/EstadisticaReporte/Reporte.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/EstadisticaReporte/Reporte.js
new file mode 100644
index 000000000..477096560
--- /dev/null
+++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/EstadisticaReporte/Reporte.js
@@ -0,0 +1,46 @@
+jQuery(document).ready(function () {
+
+
+ getDataModel();
+
+});
+
+this.getDataModel = function () {
+ CargarEmisor();
+
+}
+
+this.CargarEmisor = function (filtro) {
+
+ var uri = CatalogosWCF + '/api/ObtenerEmisorPopUp';
+ var model = {
+ IdTipo: 1,
+ filtro: filtro == null ? '' : '&filtro=' + filtro
+ }
+
+ AjaxPostData(uri, model, false, false, CargarGridEmisores, null, null);
+
+}
+
+this.CargarGridEmisores = function (data) {
+
+ if (data != null) {
+
+ listaEmisor = data;
+
+ var Seleccionar = $("#ucBtnSeleccionarCatalogo").html();
+
+ var columnDefinition = [
+ { "data": null, className: "center", defaultContent: Seleccionar },
+ { "data": "codigo" },
+ { "data": "descripcion" }
+ ];
+
+ $('#tableEmisor').TableInit(0, false, true, true, false, columnDefinition, listaEmisor, false);
+ }
+
+ else {
+
+ toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
+ }
+}
\ No newline at end of file
diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Global.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Global.js
index 18665d09e..2e35e9978 100644
--- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Global.js
+++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/Global.js
@@ -19,7 +19,7 @@ var LinkBusquedaFichaTecnica = "http://10.50.1.97:6075/Home/Normativa_Reglamenta
//http://aya-vsrv-apptt:2525/Home/TareasPendientes
//http://aya-vsrv-wstt:2005/Sinort.svc
//http://aya-vsrv-wstt:2005/SinortCatalogos.svc
-var server = window.location.protocol + "//" + "10.50.1.97:6075" + "/" + (window.location.pathname.split('/')[1]) + "/";
+var server = window.location.protocol + "//" + "localhost" + "/" + (window.location.pathname.split('/')[1]) + "/";
var SinorLoginWCF = "http://10.50.1.123:2070/Sinort.svc";
var SinorSignupWCF = "http://10.50.1.123:2070/SinortCatalogos.svc";
var string_empty = "";
diff --git a/AYA.SlnSynor/AYA.SlnSynor/Views/Reportes/FichaTecnica.cshtml b/AYA.SlnSynor/AYA.SlnSynor/Views/Reportes/FichaTecnica.cshtml
index f5b26939d..8d4b9f647 100644
--- a/AYA.SlnSynor/AYA.SlnSynor/Views/Reportes/FichaTecnica.cshtml
+++ b/AYA.SlnSynor/AYA.SlnSynor/Views/Reportes/FichaTecnica.cshtml
@@ -1,5 +1,6 @@
@using ReportViewerForMvc;
@using System.Web.UI.WebControls;
+@model Microsoft.Reporting.WebForms.ReportViewer
@{
ViewBag.Title = "FichaTecnica";
@@ -214,9 +215,12 @@
-
- @Html.ReportViewer(ViewBag.ReportViewer as Microsoft.Reporting.WebForms.ReportViewer)
-
+ @*@if (ViewBag.ReportViewer != null){
+ @Html.ReportViewer(ViewBag.ReportViewer as Microsoft.Reporting.WebForms.ReportViewer)
+ }*@
+
+
+
diff --git a/AYA.SlnSynor/AYA.SlnSynor/Views/Reportes/ReporteFichaTecnica.cshtml b/AYA.SlnSynor/AYA.SlnSynor/Views/Reportes/ReporteFichaTecnica.cshtml
new file mode 100644
index 000000000..74d932b4a
--- /dev/null
+++ b/AYA.SlnSynor/AYA.SlnSynor/Views/Reportes/ReporteFichaTecnica.cshtml
@@ -0,0 +1,10 @@
+@{
+ ViewBag.Title = "Display Data in the Report Viewer";
+ Layout = null;
+}
+
+Display Data in the Report Viewer
+
+@* Here we call the page that I have been created into shared folder *@
+
+@Html.Partial("~/ReporteFT.aspx")