diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index d5147673d..1ed0e6bf2 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -4324,6 +4324,7 @@ Public Class ClsPaginas
PaginaDict.Add("/OC/OCPendientes.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/Registro.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/WizardRegistro.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/ListadoReportes.aspx".ToUpper(), 702)
PaginaDict.Add("/Ventas/VentasRene.aspx".ToUpper(), -1)
PaginaDict.Add("/Contratos/Contrato2.aspx".ToUpper(), -1)
PaginaDict.Add("/Flotillas/CatMantenimientos.aspx".ToUpper(), -1)
@@ -6962,7 +6963,8 @@ Public Class ClsPaginas
' GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
' End Try
'End Sub
- Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing) As Byte()
+
+ Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimulsoft As Boolean = False) As Byte()
Dim retorno As Byte() = Nothing
' Dim ObjVentas As New ClsVentas
@@ -7789,46 +7791,52 @@ Public Class ClsPaginas
Next
End If
- Dim Archivo As New System.IO.FileInfo(RutaFormato)
- If Archivo.Exists Then
- 'If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
- ' RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
- ' retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
- 'Else
- ' retorno = StreamPDF(RutaFormato, lrds, params, NombreArchivo, "PDF", MR:=Nothing)
- 'End If
- retorno = StreamPDF(RutaFormato, lrds, params, NombreArchivo, "PDF", MR:=Nothing, SubReportData:=SubReportData)
+ If Not UsarStimulsoft Then
+ Dim Archivo As New System.IO.FileInfo(RutaFormato)
+ If Archivo.Exists Then
+ 'If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
+ ' RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
+ ' retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
+ 'Else
+ ' retorno = StreamPDF(RutaFormato, lrds, params, NombreArchivo, "PDF", MR:=Nothing)
+ 'End If
+ retorno = StreamPDF(RutaFormato, lrds, params, NombreArchivo, "PDF", MR:=Nothing, SubReportData:=SubReportData)
- Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
- If Guardar Then
- If Not ArchivoPDF.Exists Then
- Try
- DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
- DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
- File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
- Catch ex As Exception
- Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
- End Try
- Else
- Try
- ArchivoPDF.Delete()
- File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
- Catch ex As Exception
- Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
- End Try
+ Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
+ If Guardar Then
+ If Not ArchivoPDF.Exists Then
+ Try
+ DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
+ DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
+ File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
+ Catch ex As Exception
+ Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
+ End Try
+ Else
+ Try
+ ArchivoPDF.Delete()
+ File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
+ Catch ex As Exception
+ Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
+ End Try
+ End If
End If
+ Else
+ params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
+ 'If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
+ ' RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
+ ' retorno = StreamBytesStimulsoft("Facturas", RutaFormatoDefault, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
+ 'Else
+ ' retorno = StreamPDF(RutaFormatoDefault, lrds, params, NombreArchivo, "PDF", MR:=Nothing)
+ 'End If
+ retorno = StreamPDF(RutaFormatoDefault, lrds, params, NombreArchivo, "PDF", MR:=Nothing, SubReportData:=SubReportData)
End If
Else
- params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
- params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
- 'If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
- ' RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
- ' retorno = StreamBytesStimulsoft("Facturas", RutaFormatoDefault, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
- 'Else
- ' retorno = StreamPDF(RutaFormatoDefault, lrds, params, NombreArchivo, "PDF", MR:=Nothing)
- 'End If
- retorno = StreamPDF(RutaFormatoDefault, lrds, params, NombreArchivo, "PDF", MR:=Nothing, SubReportData:=SubReportData)
+ RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
+ retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
End If
+
Catch ex As Exception
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
End Try
@@ -7864,9 +7872,12 @@ Public Class ClsPaginas
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
End If
-
+ Dim urlHost As String = "http://localhost:2202/"
+ If EsProduccion Then
+ urlHost = "http://sig.adssistemas.mx:6599/"
+ End If
'SITIO DE PRUEBA EN IIS
- Dim Url = New Uri(String.Format("{0}{1}", "http://localhost:2202/", Opcion))
+ Dim Url = New Uri(String.Format("{0}{1}", urlHost, Opcion))
Try
Dim dataSourceArray As New JArray()
@@ -7883,6 +7894,7 @@ Public Class ClsPaginas
Dim payload As New JObject(
New JProperty("formato", Formato),
New JProperty("ruta", RutaReporte),
+ New JProperty("UsarFormatoCompilado", false),
New JProperty("parametros", paramsArray),
New JProperty("dataSource", dataSourceArray)
)
diff --git a/Sistemas/ListadoReportes.aspx b/Sistemas/ListadoReportes.aspx
new file mode 100644
index 000000000..04c7bdaa4
--- /dev/null
+++ b/Sistemas/ListadoReportes.aspx
@@ -0,0 +1,81 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ListadoReportes.aspx.cs" Inherits="Sistemas_ListadoReportes" %>
+
+
+
+
+
+
+ Listado de reportes de Stimulsoft
+
+
+
+
+
+
+
+
+
+
+